views:

121

answers:

2

While compiling C++ code that is cross platform, g++ throws a compiler error if a .cpp or .h file does not have a newline at its end. Is there a visual studio setting that would do this automatically?

A: 

No. Why not simply leave out a couple of lines at the end when you start working on the file?

dirkgently
+1  A: 

You could use a plugin like Visual Assist or something to create code templates that put newlines at the end of your file in addition to niceties like header guards and such.

SB