News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

new line at the end of line

Started by jokerar, August 11, 2005, 04:28:43 AM

Previous topic - Next topic

jokerar

the compiler said that i must put a newline character(return) at the end of
every line of my code.

the Q is:
is this a programming requirement or is it compiler specified requirement?

thank

Ceniza

It's more like a compiler specific "requirement" (it's just a warning). I would really like to know why it likes it that way :)

rickg22

That's why I added the feature in CVS  8)

takeshimiya

It's not only a compiler specific "requeriment", it's the way ALMOST ALL Linux/Unix utilities expect a text file.
So as a general rule you must always put a newline character when editing any text file (not only .cpp)

thomas

And it is part of the ISO standard for C and C++.
Although gcc has no problems with it, some old preprocessors would mess up under certain circumstances (#include following a file that has no line end).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

mandrav

And it is a warning because, under certain circumstances, it could lead to a compiler error.

Yiannis.
Be patient!
This bug will be fixed soon...