Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Viewed less than a minute ago

vYxdfDbIXqbcsAsV

C++ gcc 13.2.0

Created at 16 minutes ago

Created by anonymous

Author

anonymous

16 minutes ago

Language

C++

Compiler

gcc 13.2.0

Options
Warnings
Don't Use Boost
C++03
-pedantic-errors

Author

anonymous

16 minutes ago

›
⌄
⌄
⌄
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

void helper(void (*func)()) {
func(); // 関数の呼び出し
}

void test() { // 関数の宣言 (兼定義)
std::cout << "hello from test()!\n";
}

int main() {
helper(test);
return 0;
}

$ g++ prog.cc -Wall -Wextra -std=c++98 -pedantic-errors
hello from test()!
Exit Code:
0