Hello, I'm trying to compile a small test program I've written to A) see if I remember anything of c++, and B) get used to using gcc to compile. The program has 7 lines of code, which will ask for a name, and return it. here's the program:
//those two are there becasue I don't exactly know which header file I need to use.
//initialized that way because if I don't do it that way, gcc returns a "FirstName not initialized in this scope" error.
cout<<"What is the first name?";
cout<<"What is the last name?";
cout<<"The name is "<<Firstname<<" "<<Lastname;
When I runn gcc with the -c option, it compiles fine. But then, when I take that object file, and try to compile it into a program using the -o option, I get a bunch of "Unreferenced something or other , std::cout" and "cin" errors. Any ideas what could be causing it? And I don't have a ready file with all the errors in it, if anyone could tell me how to send the errors to a file so I can read them later, it would be much appreciated.