C/C++ sources compiled with MINGW(DevCPP) as C++

J

Jose Garcia

Hi...

I am wrinting a win32-aplicattion that not uses classes.
I use stdio.h and iostream for example, and, the operators new & delete
for memory.

Then... Is "licit" to mix c & c++ code, compiled as c++, without OOP ??

Or.. maybe i have to translate to only C code and forget "cout <<",
new, delete, etc... if I not use objectes and classes?

By the way, another question. If The project is in c++ option setting,
the extensions of the sources are created as *.cpp and the default
compiler is g++.exe. If the project option language is C, is the
gcc.exe the default compiler... thats right I suppose... So... Why not
use g++.exe for *.cpp and *.c ??

Txs!!
 
V

void

Hi!!!

Jose said:
By the way, another question. If The project is in c++ option setting,
the extensions of the sources are created as *.cpp and the default
compiler is g++.exe. If the project option language is C, is the
gcc.exe the default compiler... thats right I suppose... So... Why not
use g++.exe for *.cpp and *.c ??

Because C and C++ are diffrent languages and sometimes incompatible.
See:
http://david.tribble.com/text/cdiffs.htm
for details.
Best
Darek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top