C++ University assignment

Hello there.

I have an assignment from my university, I am making a simple trivia application on Visual Studio. the thing is that i didnt have a course on visual c++ i only know how to code for console applications and i have a lot of questions...

For starters, I made a function for every question to be displaced on some layers, the thing is I dont know how to put a loop on the button.. :/ like when the the question is answer the user can press next and an other question will appear.
closed account (N85iE3v7)
Hope this helps

http://www.functionx.com/visualc/index.htm

Best online resource for Visual C++/MFC.
Help for the fast respond.. :)

This is what i want to do and i dont know how..

GameFunction(){
int Rights = 0;
int Wrongs =0;
int Count = 0;

while(Count<=2){
if(count==0){
displayQuestionOne();

if( button1 = clicked){Rights =+ 1; }
else if(button2 = clicked || button3 = clicked || button4 = clicked){Wrongs=+1;}
}
if(count==1){
displayQuestionTwo();

if( button2 = clicked){Rights =+ 1; }
else if(button1 = clicked || button3 = clicked || button4 = clicked){Wrongs=+1;}
}
if(count==2{
displayQuestionThree();

if( button3 = clicked){Rights =+ 1; }
else if(button2 = clicked || button1 = clicked || button4 = clicked){Wrongs=+1;}
}
count++;
closed account (o1vk4iN6)
 
if( button1 = clicked) { }


In C++ this is a valid assignment, you are assigning clicked to button1 and then testing the assigned value. You had it right for count...

 
if ( button1 == clicked ) { }
Last edited on
the only choises it gives me is if (button == Click ) and it says its wrong.. and if button == helpButtonClicked
:/ please anyone?
Operator is += not =+.
Also, if you want to make a GUI app, I recommend wxWidgets, as it is cross-platform.

Aceix.
Last edited on
Topic archived. No new replies allowed.