//A Fight
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
using namespace std;
using std::cout;
using std::endl;
using std::cin;
using std::string;
int main()
{
char again = 'y';
while (again == 'y')
string yourweapon;
cout << "Enter weapon: ";
[B][U] cin >> yourweapon;[/U][/B]
string yourname;
cout << "Enter first name: ";
cin >> yourname;
string enemyname;
cout << "Enter enemy name: ";
cin >> enemyname;
srand(time(0));
int randomNumber = rand();
int healthloss = (randomNumber % 200) + 1;
cout << "You did damage " << healthloss << endl;
{
cout << "\n**Played a cool game**";
cout << "\nDo you want to play again? (y/n): ";
cin >> again;
}
cout << "\nOkay, bye.";
return 0;
}
I am teaching myself C++ and this is my first program. the error is bolded and underlined.