On Fri, 28 Mar 2003 04:26:51 -0500
"Steven T. Hatton"
On Friday 28 March 2003 02:39 am, Derek Fountain wrote:
Show us the code! My guess is you are actually using
instead of <iostream>. For me, compiling: #include <iostream>
int main( int argc, char *argv[] ) { std::cout << "derek" << "\n"; return 0; }
with:
g++ -o iostream iostream.cpp
works fine.
No need. The code is almost identical you yours. The Part I didn't know to do whas "std::". And the "endl" seems to be a thing of the past as well. Thanks for the help.
This should give you an idea of how long it's been since I worked with C++. You can get around using thinkgs like std::cout by adding a using clause: using namespace std; This will pull in the entire std namespace or: using std::cout; using std::endl; These will allow you to use both cout and endl. #include <iostream> using std::cout; using std::endl;
int main( int argc, char *argv[] )
{
cout << "derek" << endl;
return 0;
}
gaf@gaf:~/src> g++ derek.cpp -o derek
gaf@gaf:~/src> ./derek
derek
#include <iostream>
using namespace std;
int main( int argc, char *argv[] )
{
cout << "derek" << endl;
return 0;
}
gaf@gaf:~/src> g++ derek.cpp -o derek
gaf@gaf:~/src> ./derek
derek
--
Gerald Feldman