為什么不使用cout
#include<stdlib.h>
#include<iostream>
using namespace std;
namespace A
{
? ? int x = 1;
? ? void fun()
? ? {
? ? ? ? cout<<"A"<<endl;
? ? }
}
namespace B
{
? ? int x = 1;
? ? void fun()
? ? {
? ? ? ? cout<<"B"<<endl;
? ? }
}
int main()
{
?cout<<A::x<<endl;
?B::fun(); ? ?這里為什么不使用cout就可以直接輸出,反而加了cout卻不能輸出了?
?system("pause");
?return 0;
}
2016-04-14