int main(int argc, const char * argv[]);
int a;//current #
int b;//computer move
int c;//human move
int d;//random move
int e;//test integer
int i;//turn counter
cin>> e; //expected unqualified-id //unknown type name 'cin'
cout<<(2*e); //expected unqualified-id //unknown type name 'cout'
#include <cstdio> // use the C++ headers, not the C headers
#include <cstdlib> // ditto
#include <iostream>
#include <cmath> // ditto
int main(int argc, constchar * argv[]) // <- no semicolon. This is not a prototype
{ // <- function body must go in braces.
int currentNumber; // <- give your variables meaningful names instead of single letters
int computerMove; // that way you don't need to comment what they are because
int humanMove; // the name tells you what they are.
int randomMove; // it makes your code much easier to read and understand
int test;
int turnCounter;
std::cin >> test; // cin is in the std namespace. Full name is "std::cin"
std::cout << (2*test); //ditto for cout
} // <- end of function body requires closing brace
If you do not want to type std::cin and std::cout... you can instead put usingnamespace std; in your code. This will take everything in the std namespace and dump it into the global namespace:
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
usingnamespace std; // <- dump the entire std namespace into the global namespace
int main(int argc, constchar * argv[])
{
//...
cin >> test; // now this will work
cout << (2*test);
}