Mail Archives: djgpp/2001/09/05/22:53:24
Hi, I am using djgpp now. But I've met a problem. See the program below.
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
string s;
s = "0";
cout << setw(5) << s << endl;
cout << setw(5) << "0" << endl;
return 0;
}
the output on my pc:
0
0
In my opinion, the two lines of output should be the same, which is not in fact. Is it a bug of djgpp, or I've made some mistakes?
I compiled the program under win2000, using djgpp v2.03 and gpp 2.9.52.
BTW: Does djgpp support the sstream library? It is quite convenient.
===================================================================
ÐÂÀËÃâ·Ñµç×ÓÓÊÏä (http://mail.sina.com.cn)
ÏëÈÃ100ÍòÄ°ÉúÈËͬʱ°®ÉÏÄãô?À´ÕÒÎÒ°É! (http://cheese.sina.com.cn)
ÕÒÅóÓÑ£¿ÕÒ¹¤×÷£¿ÕÒÉú»îʵÓÃÐÅÏ¢£¿µ½ÐÂÀË·ÖÀàÐÅÏ¢ (http://classad.sina.com.cn/)
- Raw text -