C++ Nuts & Bolts: For Experienced ProgrammersStraightforward and concise, C++ Nuts and Bolts is the ideal way for readers to get up and running with C++. Schildt provides everything programmers need to know to start programming in C++ quickly and effectively, without unnecessary tutorials or remedial information. Includes "Fast Track Tips" and "How To" boxes that help the reader immediately apply the material. |
From inside the book
Results 1-3 of 20
Page 197
... temp ; temp.i = 100 ; temp.d = 123.23 ; } return temp ; Here , f ( ) creates a local structure called temp , assigns values to its members , and returns the structure . Inside main ( ) , the variable var1 receives the return value . As ...
... temp ; temp.i = 100 ; temp.d = 123.23 ; } return temp ; Here , f ( ) creates a local structure called temp , assigns values to its members , and returns the structure . Inside main ( ) , the variable var1 receives the return value . As ...
Page 287
... temp [ i ] = * str ++ ; temp [ i ] = ' \ 0 ' ; // null terminate month = atoi ( temp ) ; // get day str ++ ; // advance past slash for ( i = 0 ; * str ! = ' / ' && * str ! = ' \ 0 ' ; i ++ ) temp [ i ] = * str ++ ; temp [ i ] = 0 ...
... temp [ i ] = * str ++ ; temp [ i ] = ' \ 0 ' ; // null terminate month = atoi ( temp ) ; // get day str ++ ; // advance past slash for ( i = 0 ; * str ! = ' / ' && * str ! = ' \ 0 ' ; i ++ ) temp [ i ] = * str ++ ; temp [ i ] = 0 ...
Page 312
... temp ; temp.x = x + ob2.x ; temp.y = y + ob2.y ; return temp ; } // Overload + for ob + int coord coord :: operator + ( int i ) { coord temp ; temp.x = x + i ; temp.y = y + i ; } return temp ; main ( ) { coord o1 ( 10 , 10 ) , o2 ( 5 ...
... temp ; temp.x = x + ob2.x ; temp.y = y + ob2.y ; return temp ; } // Overload + for ob + int coord coord :: operator + ( int i ) { coord temp ; temp.x = x + i ; temp.y = y + i ; } return temp ; main ( ) { coord o1 ( 10 , 10 ) , o2 ( 5 ...
Contents
C++ Fundamentals | 5 |
Control Statements | 31 |
A Closer Look at Data Types Variables | 63 |
Copyright | |
14 other sections not shown
Common terms and phrases
AreaOfTriangle array assignment automatically base class binary operator bits block bytes C++ compilers C++ program C++'s CALIFORNIA/SANTA CRUZ chapter character constructor function contains copy constructor cout cout statement create CRUZ The University data type declared default arguments defined derived class derived2 double dynamic allocation error example exception handling executed expression float following program friend function func function called function overloading function returns global variables header file Herbert Schildt include iostream.h increment inherited initialization inline inline functions input inside integer keyword language loop malloc manipulator member function memory myclass myfunc null operand operator function operator overloading output overloaded functions passed pointer program displays prototype recurse reference parameter return statement return type return value samp shown specified stack strcmp strcpy stream string strl strtype structure temp University Library UNIVERSITY UNIVERSITY OF CALIFORNIA/SANTA unsigned virtual function void zero