09/07/05 09:01:09
>>627 関数が使えるなら。
#include<iostream>
using namespace std;
namespace {
int m;
void sub(void) {
if (m == 'a') cout << "『aが格納されています』" << endl;
else cout << "『'a'でない文字が格納されています』" << endl;
}
}
int main(){
m='a';
sub();
m='x';
sub();
return 0;
}