Thoughts on running programs in C++ on other devices

I have always had a headache because a program written in the C++/11 standard cannot run on a computer with only Dev, so I think about how to make my program run on someone else's device.

After entering the data query and own practice, I summed up the following method:
change the debugging Dubug to Release, and then run the program. After the end, there is a folder Release in the folder of the project, and the exe file can be used alone without relying on Visual Studio. (No C++ related programs are required)

Tip: If there is feedback at the end of the program, the program will automatically close immediately after the feedback jumps out, causing the user to be unable to see the feedback. To solve this problem, simply add two lines of code:

    char anything;
    cin >> anything;

or

    getchar();

In this case, the interface will continue to exist waiting for input. Therefore, the problem of invisible feedback is solved.

The above method may be a bit crude to summarize for myself.

Sample program:
[C++ Program] Tic-Tac-Toe Game (Human VS Human)
[C++ Program] Tic-Tac-Toe Game (Human VS Lv1 Computer)
[C++ Program] Tic-Tac-Toe Game (Human VS Lv2 Computer)
[C++ Program] Tic Tac Toe Chess Game (Human VS Lv3 Computer)
[C++ Program] Tic-Tac-Toe Game (Human VS Lv3 Computer) (Record Statistics Edition)
[C++ Program] Gobang Game (Human VS Human)
[C++ Program] Gomoku Game (Human VS Lv1 Computer) (Thinking and framework, content to be filled)
[C++ Program] Random Number
[C++ Program] Moving Maze Game
[C++ Program] Snake Game
[C++ Program] Digital Pushing Game (15-puzzle)
[C++ Program] 2048 Game

Guess you like

Origin blog.csdn.net/weixin_50012998/article/details/108461294