
-----------------------------------
CHINA_yanglei
Thu Apr 09, 2009 6:33 pm

Why do I get these disordered and unexpected result in the output file?
-----------------------------------
#include 
#include 
int main()
{
	char str

I want to be a result like "YangLeiwelcome to you!",but in fact,the result is not a unexpected one.Thank you for your help very much!

Mod Edit: Remember to use syntax tags! Thanks :) Code Here

-----------------------------------
Insectoid
Thu Apr 09, 2009 6:34 pm

RE:Why do I get these disordered and unexpected result in the output file?
-----------------------------------
..can you describe the result?

-----------------------------------
CHINA_yanglei
Fri Apr 10, 2009 10:27 am

RE:Why do I get these disordered and unexpected result in the output file?
-----------------------------------
The result is like "Y   L    welcome to you!" 
Oh,I'm sorry about a  negligence.
"std::ofstream appos("test.txt",std::ios::app); " 
should be
 "std::ofstream appos("test.txt",std::ios::ate); "
