注册 登录
编程论坛 C++教室

fout 使用方法

vfdff 发布于 2008-08-24 23:07, 1704 次点击
为什么 我能使用
fsOut <<j<<" "<<j<<" "<<0<<endl ;
却不能使用
fsOut <<(j&3)<<" "<<(j>>2)<<" "<<0<<endl ;
其中 ofstream fsOut("TestData.dat");

同样
我能使用
cout <<j<<" "<<j<<" "<<0<<endl ;
却不能使用
cout <<(j&3)<<" "<<(j>>2)<<" "<<0<<endl ;

[[it] 本帖最后由 vfdff 于 2008-8-24 23:08 编辑 [/it]]
2 回复
#2
p1s2008-08-26 12:45
是否包含了头文件
是否正确使用了命名空间
#3
vfdff2008-08-26 13:29
回复 2# p1s 的帖子
当然,不然 cout <<j<<" "<<j<<" "<<0<<endl ; 怎么可能通过>
1