【发布时间】:2012-01-04 06:57:56
【问题描述】:
#include <iostream>
using namespace std;
int main()
{
HelloWorld();
return 0;
}
void HelloWorld()
{
cout << "Hello, World" << endl;
}
我在使用 g++ 时遇到以下编译错误:
l1.cpp: In function 'int main()':
l1.cpp:5:15: error: 'HelloWorld' was not declared in this scope
【问题讨论】:
-
我很喜欢这个问题作为“热门问题”直接在 StackExchange 上出现。