cygwin

Hello, I use cygwin to compile my cpp file. The problem is that in my code I output data to the file and I need the data to be in column format. For this to happen I use endl; or "\n"; Visual studio compiler compiles correctly... so I get output in a column, but cygwin is compiling differently and I get all the output in one line. Can anyone tell me what I need to write to make it work also on cygwin?

the problem occurs only when i try to output data in the file... it's like the compiler doesnt see endl;
just tried "\r\n" and it worked. Wrote it in case someone will have the same problem.
I think you problem is this: You compile in VS, and endl's are turned into "\r\n", the Windows newline sequence. Everything is fine then.

You compile through cygwin, and the endl's are thus turned into only "\n", the newline sequence for UNIX/etc. If you were to look at the file through something like Notepad, it probably would display on one line.
Topic archived. No new replies allowed.