compiling with string.h in C++
I'm having trouble loading the "string" class into my C++ files. I compile using gcc through Terminal. In my main program file, I have
#include <string.h>
at the top, but when I compile (by typing "make" into the command line), the line
string s;
gets the error
'string' undeclared
If I type
using namespace standard;
below the #include and compile, I get the error
parse error before "namespace"
Do you have any suggestions for how I can get string library working? Do I need to add a line to the makefile?
#include <string.h>
at the top, but when I compile (by typing "make" into the command line), the line
string s;
gets the error
'string' undeclared
If I type
using namespace standard;
below the #include and compile, I get the error
parse error before "namespace"
Do you have any suggestions for how I can get string library working? Do I need to add a line to the makefile?
PowerBook G4, Mac OS X (10.3.9)