GUI guessing card game

I would like to try to make a guessing card game using GUI and c++ on visual studios.
Here is the brief description of the guessing card game on the google docs
https://docs.google.com/document/d/1X0QWzO-s17LkLHcPmde2pws5mAYKJpVuj5W0w95HQWc/edit?usp=sharing

Did tried it, still struggle to do since I have no idea should I use rand() for this program of the game but it only require 2 cards for the random guessing card game since the cards must be randomly generated(either 1 or 2 is correct or wrong). So far I can think of how to work with the options using a switch and cin input of guesscards.

Not to mention I have no idea how to make a gui for the guessing card game

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
https://www.expresshr.me/
using namespace std;

int main()
{
int guesscards;
int revealanswer;
cout << "1. Spade of ace\n";
cout << "2. Heart ace\n";
cin >> guesscards;
revealanswer = rand() % 2;

switch(guesscards)
{
case 1:
if (guesscards != revealanswer)
{
cout << "correct answer" << endl;
break;
}
else
{
cout << "wrong answer" << endl;
}

break;

case 2:
if (guesscards != revealanswer)
{
cout << "correct answer" << endl;
break;
}
else
{
cout << "wrong answer" << endl;
}
break;
}
}
Edit & Run


Keep in mind the program should be a beginners level so it makes me easier to understand as a beginner, therefore dont make the program very complicated
Last edited on
The screenshot on Google drive looks like a WinForm application.

One option is C++ / CLI with Visual Studio
http://www.functionx.com/cppcli/index.htm

Another option is to use MFC with Visual Studio:
http://www.functionx.com/visualc/index.htm

The other option is to use C++ Builder:
http://www.functionx.com/cppbcb/index.htm



Topic archived. No new replies allowed.