turbine
01-25-2005, 11:03 PM
Howdy all:
I tried to compile this very simple c++ program using gcc and/or g++.
#include <iostream> // cout, cin
main()
{
char buf[255];
cout << "Please enter a string ==> "; // O/P to STDOUT (screen).
cin >> buf; // I/P from STDIN (keyboard).
cout << "Entered string is " << buf << endl;
}
I get an error saying that cin and cout are not defined. I've tried this on both knoppix 3.3 and knoppix 3.7.
Any ideas?
I tried to compile this very simple c++ program using gcc and/or g++.
#include <iostream> // cout, cin
main()
{
char buf[255];
cout << "Please enter a string ==> "; // O/P to STDOUT (screen).
cin >> buf; // I/P from STDIN (keyboard).
cout << "Entered string is " << buf << endl;
}
I get an error saying that cin and cout are not defined. I've tried this on both knoppix 3.3 and knoppix 3.7.
Any ideas?