Intro to strings this morning
#include iostream
using namespace std;
int main () {
char buffer[10];
cout << "Type some text and shit" << endl;
//hold space for the null character
cin.getline(buffer,9);
cout << "You typed : " << buffer << endl;
return 0;
}
Thursday, December 30, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment