我正在Visual Studio 2008中進行C++編程任務。我們與定義下列命名空間層次結構的文件中提供的(名字都只是爲了這個職位的緣故,我知道「命名空間XYZ命名空間」是多餘的): (MAIN-NAMESPACE){
a bunch of functions/classes I need to implement...
(EXCEPTIONS-NAMESPACE){
當我編譯使用g++ class A {};
void foo(A&) {}
int main()
{
foo(A());
return 0;
}
我收到以下錯誤消息下面的代碼: > g++ test.cpp -o test
test.cpp: In function ‘int main()’:
test.cpp:10: error: invalid ini