Ian Collins said:
This is what I get
[cwilson@orion Hw7]$ gcc hw7.cpp
/tmp/ccN2xrWu.o: In function `main::._84::._84()':
hw7.cpp
.text+0x15): undefined reference to `std::basic_string<char,
It looks like your compiler isn't installed correctly (missing
standard library?). These are linker errors.
This sort of error often results from using "gcc" instead of "g++" to
compile a C++ program. "gcc" knows how to compile a C++ file to an
object file (because each source file ends in ".cpp"), but when
invoking the linker, doesn't realize that it should link with C++
libraries; using "g++" explicitly tells the driver that it should do
that.
Try using "g++ hw7.cpp" instead.
-Miles