#include <iostream>
using namespace std;
int main()
{
HelloWorld();
return 0;
}
void HelloWorld()
{
cout << "Hello, World" << endl;
}
Ben ++ g ile aşağıdaki derleme hatası alıyorum:HelloWorld işlevim neden bu kapsamda açıklanmadı?
l1.cpp: In function 'int main()':
l1.cpp:5:15: error: 'HelloWorld' was not declared in this scope
Bu sorunun StackExchange'ı "Sıcak Soru" olarak nasıl çektiğini seviyorum. – surfasb
olası kopyası [Neden herhangi bir sınıf beyanı olmadan prototip gereklidir?] (Http://stackoverflow.com/questions/8199081/why-prototype-is-required-even-without-any-class-declaration) –