- 论坛徽章:
- 0
|
用的是RedHat 8.0
如果c++程序中有输出比如
cout<<string("output string here" ;
之类的
在几条输出语句之后,有的就被提示符掩盖了。如果你把输出的字符串变长,
比如
cout<<string("hello,world!jfio@jioooajflsolcvjosjosdfsf" ;
就可以显示出后面的部分。
以前在RH7.3的时候,同样的程序没有这样的毛病。
而且现在我的C++程序都有了这样的问题。
到底是什么原因
example:
#include
#include <vector>;
#include <string>;
using namespace std;
int main()
{
vector<string>; Vec_str;
string input_str;
while(cin>;>;input_str)
Vec_str.push_back(input_str);
for(int i=0;i<Vec_str.size();i++)
cout<<" Vec_str["<<i<<"]= "<<Vec_str<<"\t";
return 0;
} |
|