Language
C++
Compiler
gcc 13.2.0
Options
Warnings
Don't Use Boost
C++03
-pedantic-errors
#include <iostream>
#ifdef IS_2ND_STAGE
int main() {
test(); // 関数の呼び出し
return 0;
}
#else
void test() { // 関数の宣言 (兼定義)
std::cout << "hello from test()!\n";
}
#define IS_2ND_STAGE
#include __FILE__
#endif
$ g++ prog.cc -Wall -Wextra -std=c++98 -pedantic-errors
hello from test()!
Exit Code:
0