【发布时间】:2019-05-04 13:30:27
【问题描述】:
我试图在main函数中运行一个测试,但是显示错误“你不能重载main()函数”。
#define CATCH_CONFIG_RUNNER // -- main() создавать нужно --
#include "catch.hpp"
int main(int argc, char* argv[])
{
setlocale(LC_ALL, "Russian");
int result = Catch::Session().run(argc, argv);
system("pause");
return result;
}
【问题讨论】:
-
@devdotlog 但我的代码中只有一个主要功能。