I'm not getting an error message because I can't seem to install MSDN, which is supposed to give me the error messages, from what I've read. I've updated my code to what you suggested, or what I could make it out to be, but I still get one error:
Code:
#include <iostream>
#include <string>
using namespace std;
string WhatToDo()
{
cout << "What do you want to do?\n\n";
return 0;
}
string OpenGate()
{
cout << "You open the gate and step inside the yard. You marvel at the fact that even\n";
cout << "though this yard is tiny, there has apparently been no effort expended toward\n";
cout << "it's upkeep. You hear what could be muffled growling coming from your left.\n\n";
WhatToDo();
return 0;
}
string main()
{
char a;
cout << "You are standing in front of a run-down house. There is a blue sportscar that\n";
cout << "looks like it hasn't been driven in years parked out front. The car is covered\n";
cout << "in leaves. The house itself looks like it could collapse at any moment.\n";
cout << "There is a chain-link fence surrounding the house. The house has a screened-in\n";
cout << "porch, but you can't see much beyond that. Planted in the yard are trees which,\n";
cout << "if properly pruned, were probably nice bushes at one time. There is a closed\n";
cout << "gate which leads through the fence.\n\n";
WhatToDo();
cin >> a;
if (a = "open gate")
OpenGate();
else cout << "Please enter a valid command.\n";
return 0;
}
Like I said, I'm new. I've been doing this for maybe two days. I'm taking baby steps here.