C++ cin and data problem

I am working on a program and I need to call data from a cin...how can I do this without doing a cout.I would appreciate any help on this problem. No too complicated because I am a newbie

When I try to compile this is the message error

1.cpp In function `int main()':
no match for call to `


(std::ostream) (const char[2])'
#include <iostream>
#include <iomanip>
#include <string>
#include <cctype>
using namespace std;

int main()



{
string meal;

int student_Id;
int num_Courses;
char degree;
bool inState;
bool I_home;
bool O_away;
char val;
char U;
char G;
char student;


cout <<" "<< endl;
cout <<" "<< "Tuition Calculations Program"<<endl<<endl;
cout <<" "<< "Enter your student id: " ;
cin >> student_Id; //User input for ID
cout << endl << endl;
cout <<" "<< "Which program are you in? \n";
cout <<" "<< "([U]ndergraduate, [G]raduate): ";
cin>>degree; //I need the results of this to go into the last statement
degree = toupper(degree);
cout<<endl;
cout <<" "<< "Enter the number of courses you are taking: ";
cin >> num_Courses;
cout << endl <<endl;
cout<<(" ")<<"I = In-state \n O = Out-of State"<<endl;
cout<<(" ") <<"Are you an in-state or out-of state resident ";
cout<<(" ")<<"(I/O)? ";
cin>>val;
if (val == 'I')
inState = I_home;
else
inState = O_away;
cout<<(" ")<<"Do you have a meal plan? (yes or no, all lowercase) ";
cin>>meal;
cout<<endl<<endl<<endl;
cout<<showpoint<<fixed<<setprecision(2);
cout<<"\t\tPENNY LANE UNIVERSITY TUITION BILL"<<endl<<endl;
cout<<(" ")<<"Student Id;\t"<<student_Id<<endl;
cout(" ")<<"Program:\t"<<degree<<endl; //last statement




cout<<endl<<endl;
system ("PAUSE");
return 0;
}
On your last output line you forgot a << :
cout /*HERE*/ (" ")<<"Program:\t"<<degree<<endl; //last statement
If you don't want to use cout you can use the C way of output:
http://www.cplusplus.com/reference/clibrary/cstdio/printf/
Topic archived. No new replies allowed.