E
eli m
I am using the dev c++ compiler and i have this code:
#include <iostream>
int main ()
{
int cmd = 0;
cout << "Type in help for a list of commands";
while (cmd == 0) {
cout << "Type in a function:";
cin >> function;
}
}
And i got these errors:
In function `int main()':
5 `cout' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
8 `cin' undeclared (first use this function)
8 `function' undeclared (first use this function)
Why am i getting these errors? How am i supposed to do this in c++?
#include <iostream>
int main ()
{
int cmd = 0;
cout << "Type in help for a list of commands";
while (cmd == 0) {
cout << "Type in a function:";
cin >> function;
}
}
And i got these errors:
In function `int main()':
5 `cout' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
8 `cin' undeclared (first use this function)
8 `function' undeclared (first use this function)
Why am i getting these errors? How am i supposed to do this in c++?