firstly id like to thank people for helping me with my earlier problems.
anyway, for this program im working on, i want the user to be able to select between two patterns.
eg. pattern1 makes x=1 and y=0
pattern2 makes x=0 and y=0
i tried using if statements, but it doesnt seem to work properly.
here is my code - although i wont put all of it in
cout << "please select which pattern: ";
cin >> pattern;
if ( pattern == '1' )
{
target1 = 1;
target2 = 0;
}
if ( pattern == '2' )
{
target1 = 0;
target2 = 1;
}
cout << endl << "target 1 is: " << target1
<< endl << "target 2 is: " << target2;
the cout commands for the targets dont show up as i would expect. there is other stuff later on that needs to be selected and done so the else command wouldnt really work.
thanks