ack...meant to be a reply to CC header libraries. sorry
#include <string> will work. I was using it just the other day to do some C++ programming for a class. Your compiler is c++, also note there is a bug in it when doing input. If you want a console prompt for input, you must end the line if you want it to display before the console waits for input.
ie:
#include <iostream>
#include <string>
using namespace std;
// Read and display data.
int main()
{ string input;
cout << "Type a word: ";
cin >> input;
cout << "You typed: " << input << endl;
return 0;
}
needs to be changed to:
#include <iostream>
#include <string>
using namespace std;
// Read and display data.
int main()
{ string input;
cout << "Type a word: " << endl; // note the endl; here, this is the change
cin >> input;
cout << "You typed: " << input << endl;
return 0;
}
Just a little heads up on a glitch to come. Compile and run each to see specifically what I mean. Apple needs to do a little work on the c++ compiler. :-)
Ryan C.
[This message has been edited by rwc9785 (edited 04-26-2001).]