Dec 18, 2008 at 3:01pm UTC
The classical extension for C++ sources is .cpp, but others, .C included, are recognized.
Dec 19, 2008 at 1:26am UTC
helios is right
but you cannot include iostream header in a .c file i suppose
better use .cpp extension
i think thats why the compiler didnt include iostream in your(igneousquill) program
Dec 19, 2008 at 1:32am UTC
Not in a .c, but you can in a .C.
The extension doesn't really matter, actually. It's only a help for the compiler so that it knows how to compile what. If you pass a .c to g++, it will compile it as a .cpp all the same.
Dec 19, 2008 at 4:09pm UTC
helios u r right
actually when i posted i was working with windows
thats why i cudnt cross check
as i wasnt sure i only gave my supposition
anyways thank u for ur post