代码块中的错误消息:对'WinMain @ 16'的未定义引用

问题描述 投票:0回答:1

我想在代码块20.03中运行以下代码,但收到错误消息:Undefined reference to 'WinMain@16'

代码:


std::string countSheep(int number) 
{
  std::string res;
  std::string s = " sheep...";

  for (int i = 1; i <= number; i++) {
    res += std::to_string(i) + s;
  }

  return res;
}

最初的问题是,我收到了错误消息:to_string“不是'std的成员>之后,我将我的GCC编译器更新为9.2.0。但是现在,我不断收到该winmain错误消息。

你有什么想法,怎么办?

我想在代码块20.03中运行以下代码,但收到错误消息:对'WinMain @ 16'的未定义引用。代码:std :: string countSheep(int number){std :: string res; std :: string ...

c++ gcc codeblocks winmain
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.