Visual studio stringstream操纵器&;vstudio 2003
我试图在VC++(VStudio 2003)中使用stringstream对象,但是当我使用重载的时,我遇到了一个错误,您确定包含了所有正确的头吗?在VS2003中为我编译了以下内容:Visual studio stringstream操纵器&;vstudio 2003,visual-studio,stl,Visual Studio,Stl,我试图在VC++(VStudio 2003)中使用stringstream对象,但是当我使用重载的时,我遇到了一个错误,您确定包含了所有正确的头吗?在VS2003中为我编译了以下内容: #include <iostream> #include <sstream> #include <iomanip> int main() { int SomeInt = 1; std::stringstream StrStream; StrStream &l
#include <iostream>
#include <sstream>
#include <iomanip>
int main()
{
int SomeInt = 1;
std::stringstream StrStream;
StrStream << std::setw(2) << SomeInt;
return 0;
}
#包括
#包括
#包括
int main()
{
int-SomeInt=1;
std::stringstream stream;
StrStream我喜欢这样的流式问题
/Allan您可能只是忘记了包含iomanip,但我不能确定,因为您没有包含完整程序的代码
这个完整的程序在这里使用VS 2003运行良好:
#include <sstream>
#include <iomanip>
int main()
{
int SomeInt = 1;
std::stringstream StrStream;
StrStream << std::setw(2) << SomeInt;
}
#包括
#包括
int main()
{
int-SomeInt=1;
std::stringstream stream;
StrStream
#include <sstream>
#include <iomanip>
int main()
{
int SomeInt = 1;
std::stringstream StrStream;
StrStream << std::setw(2) << SomeInt;
}