回 帖 发 新 帖 刷新版面

主题:跪求高手指点

#include<iostream.h>
#include<iomanip>
void main(void)
{
int i=12,j=100;
float x=0.618f;
cout<<i<<j<<x<<endl;
cout<<i<<','<<j<<','<<x<<endl;
cout<<setw(6)<<i<<setw(6)<<j<<setw(10)<<x<<endl;
}


以上的程序哪儿出错了,我一运行就出现
--------------------Configuration: setw - Win32 Debug--------------------
Compiling...
setw.cpp
D:\c++\未解决\setw.cpp(9) : error C2065: 'setw' : undeclared identifier
Error executing cl.exe.

setw.obj - 1 error(s), 0 warning(s)

回复列表 (共4个回复)

沙发

#include<iomanip>改为#include<iomanip.h>

板凳

你不要说跪求。。。提问就不要尊严了?这样的话不能随便说的。。。

3 楼

谢谢,问题解决了!

4 楼

[em14]

我来回复

您尚未登录,请登录后再回复。点此登录或注册