View Single Post
Old 02-05-2007, 03:34 PM   #5 (permalink)
tiggerzone
Recruit
 
Join Date: Feb 2007
Posts: 18
tiggerzone is on a distinguished road
what I learned so far

float
constant
assignment operator
getline () funtion
arguments
ignore ()
newline character


some thing like this :
example from text book


# include <iostream>
# include <string>


using std: : cout ;
using std: : cin ;
using std: : end l;
using std: : string ;


int main ()
{

//declare variables
double sales = 0.0 ;
string stateName = " " ;


// enter input items
cout << "Enter the sales amount : " ;
cin >> sales ;
cin.ignore (100, '\n') ;
cout << "Enter the state name : " ;
getline ( cin, stateName) ;


//display output items
cout << " You entered sales of " << sales ;
cout << " for " << stateName << end ;


return 0 ;
} // end of main function




(this was an example in the text book they gave us )
tiggerzone is offline   Reply With Quote