-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.cpp
More file actions
39 lines (27 loc) · 876 Bytes
/
run.cpp
File metadata and controls
39 lines (27 loc) · 876 Bytes
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
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
STARTUPINFO startInfo = {0};
PROCESS_INFORMATION processInfo = {0};
STARTUPINFO startInfo2 = {0};
PROCESS_INFORMATION processInfo2 = {0};
int n;
cout<< "Press '1' to play Console 2048"<<endl;
cout<<"Press '2' to play Console MineSweeper"<<endl;
cin>>n;
switch (n){
case 1:
{
cout<<"You are now playing Flappy Bird"<<endl;
BOOL bSuccess = CreateProcess(TEXT("../Game/2048/Console2048.exe"),NULL,NULL,NULL,FALSE,NULL,NULL,NULL, &startInfo,&processInfo);
break;
}
case 2:
cout<<"You are now playing car race"<<endl;
BOOL bSuccesss = CreateProcess(TEXT("../Game/Minesweeper/ConsoleMinesweep.exe"),NULL,NULL,NULL,FALSE,NULL,NULL,NULL, &startInfo2,&processInfo2);
break;
}
return 0 ;
}