Basicaly I'm making a VERY simple text based adventure game, I am probably doing it all wrong, and I'm using Visual C++ 2008. Also if you could tell me how to find a word in a sentence the user will enter that would be nice too. Thanks! Question 2 - 5 are basically just a copy and past of Question1.

answer1 is just a single character and you are attempting to compare it, illegally by the way, to a string. You need to make answer1 a character array and use strcmp() to compare it to a string. Or you could make answer1 a std::string object, since this is c++. Note the double quotes around "Leave".

std::string answer1;
...
cout<<"You awake and get out of bed and realize that you want to go kill a dragon for no reason. Now what? ";
cin >> answer1;
if (answer1 == "Leave")
right = 1;
else
right = 0;

To make that cleaner you can use a couple of methods (assuming 'answer1' is now the correct type): right=(answer1 == "Leave"); as the conditional returns 1 if it's true, 0 if it's false. right=(answer1 == "Leave")? 1 : 0; the ternary operator

or probably easiest to read and least bug-prone:

if (answer1 == "Leave")
{
right = 1;
}else{
right = 0;
}

Below, '=' is an assignment operator, '==' is a comparison operator. You are assigning the value 0 to right.

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...