24 game is an arithmetic game with a simple rule: Given 4 numbers and use + - * / to get 24.
1, 2, 3, 4
, and you find 1*2*3*4=24
5, 5, 5, 1
, the answer is 5*(5-(1/5))=24
, which includes fractions.24game project provides a powerful C++ solver for the 24 game. And you can play with the PyQt5 based graphical front end.
首先要看使用的是什么构建系统:
qmake
不需要额外的设置cmake
Debug需要在生成配置的时候进行额外参数设置qbs
???QtC在左下角的Debug按钮一定要在Debug模式下运行才能有效。
进入Debug模式如果是qmake
构建系统不需要额外配置。但是如果是cmake
则每次都要重新生成配置。
参考Debug with cmake and qtcreator可知生成配置的时候应当添加参数-DCMAKE_BUILD_TYPE=Debug
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
QMAKE_CXXFLAGS += -std=c++0x