Quote:
However a quick test seems to show that compiling a .c file with g++ does in fact treat it as C++. However as Ksilyan says, if they are C++ files, why not have them suffixed .cpp?
However a quick test seems to show that compiling a .c file with g++ does in fact treat it as C++. However as Ksilyan says, if they are C++ files, why not have them suffixed .cpp?
Didn't want to continue hijacking the other thread. Given that g++ doesn't care what the filenames are and will in fact compile them properly, what other compilers require this change to be done?
I understand the argument that it should be done because it's considered a standard of some kind, but how or why did this become necessary?
The main reason I didn't do this in my case ( although I have now ) was because I didn't want to have a giant file renaming commit sent to the SVN repository. And it just worked. Even in Dev-C++ it just worked. So I never really figured on bothering.
Also related, would it be necessary to do the same for the H files? I've seen some scattered instances where header files are named as *.hpp and wondered why someone would do that too.