问题遇到的现象和发生背景
c++输入输出流
#include<bits/stdc++.h>
using namespace std;
int q[10009]={1};
int main(){
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
return 0;
}
请问这样写是正确的吗?
std::能不能删去?
cin(),cout()里面的0能不能替换成NULL?
谢谢~
c++输入输出流
#include<bits/stdc++.h>
using namespace std;
int q[10009]={1};
int main(){
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
return 0;
}
请问这样写是正确的吗?
std::能不能删去?
cin(),cout()里面的0能不能替换成NULL?
谢谢~
using namespace std;后,后面的std::都可以去掉了。
tie的参数是个指针,可以用NULL