Writing my first program, and my using namespace std;
statement won't work. When I build the program I'm getting thrown this error:
C:\\Users\\p6735a\\Desktop\\Project\\game.cpp: In function `int main(int, char *)':
C:\\Users\\p6735a\\Desktop\\Project\\game.cpp:6: `string' undeclared (first use this function)
C:\\Users\\p6735a\\Desktop\\Project\\game.cpp:6: (Each undeclared identifier is reported only once
C:\\Users\\p6735a\\Desktop\\Project\\game.cpp:6: for each function it appears in.)
C:\\Users\\p6735a\\Desktop\\Project\\game.cpp:6: parse error before `;'
[Finished in 0.1s with exit code 1]
Here's the code:
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
string input;
int hp;
cout << "You see a man. Would you like to kill him?\n1. Yes\n2. No" << endl;
//cin >> input;
}