Hi,
I have some very basic problem.
I can't even get this to work , it's complaining about not being able to resolve the identifier (string, cout, endl, cin)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <cstdlib>
#include <string>
#include <iostream>
using std::string;
using std::cout;
using std::cin;
using std::endl;
int main() {
string mystring;
cout << "Enter string..." << endl;
cin >> mystring;
return 0;
}
Btw , this compiles, i just get warnings ? (yellow light bulb and red circle) I'm using netbeans.
this is just as an example code. I've had this in two programs now. One was this basic one to test it. This should be correct right??
I thought it worked, but no. The same errors again popped up when I debugged.
Also, I noticed that I do not get these errors when I use : using namespace std; instead
which I know is bad form so want to avoid.
any ideas ? Should I just reinstall ?