what i want to know is, is there a way to do a 'do-while' loop with two whiles referring to the same do, for example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
if (CHP == 0)
{
do{
cout<< Some strings and stuff etc;
cin >> Q00;
}while (Q00 == c)
cout<< Some more strings and stuff etc
cin >> Q0;
}while(Q0 == c)
}
elseif
{
}
I was having troubles getting this concept to work, Im not sure if im having syntax errors, or if this concept just wont work.
if (CHP == 0)
{
do{
do{
cout<< Some strings and stuff etc;
cin >> Q00;
}while (Q00 == c)
cout<< Some more strings and stuff etc
cin >> Q0;
}while(Q0 == c)
}
elseif
{
}
See the thing is, I Want both the do-while loops to start the loop at the same point, would the way I have it up there work?
So, I found out what the issue is ^_^, no its just a matter of solving it lol.
so as for the loop with in a loop the issue is I'm doing this:
1 2 3 4 5 6 7 8 9
do {
if ( Q == 01)
{
cout<< strings and stuff etc;
cin >> Q0;
}while (Q0 == 'c');
}
from playing with the code I found out that , that just simply wont work unless I have it like:
1 2 3 4 5 6 7 8 9
if ( Q == 01)
{
do{
cout<< strings and stuff etc;
cin >> Q0;
}while (Q0 == 'c');
}
for whatever reason I have to have the do while within the same function, or it wont work, the issue is, how do i get it to work without it being in the same function?