C++相談室 part129 [無断転載禁止]©5ch.io
レス数が950を超えています。1000を超えると書き込みができなくなります。
0988デフォルトの名無しさん (ワッチョイ f359-HQfx)
2017/03/30(木) 21:39:33.97ID:8zS706yR0■ "a.cpp"
static foo {
int func(int x, int y) { return x + y; }
};
void call_foo_a() {
foo x;
printf("%s: func(10, 20)=%d\n", __FUNCTION__, x.func(10, 20));
}
■ "b.cpp"
(a.cppと同じだが、foo::func()の中身を return x - y;に変えたやつ)
■ "main.cpp"
extern void call_foo_a();
extern void call_foo_b();
int main() {
call_foo_a(); call_foo_b();
}
レス数が950を超えています。1000を超えると書き込みができなくなります。