hi i want to compile .c file as .cpp file using makefile!!.
please some one help me to create makefile

Re: How to create makefile that compiles .c file as .cpp file 80 80

just change the filename. Otherwise how to do that will depend on the compiler. Some compilers have option flags to do that and others don't.

Re: How to create makefile that compiles .c file as .cpp file 80 80

> hi i want to compile .c file as .cpp file using makefile!!.
You'd better read Incompatibilities Between ISO C and ISO C++ then.

Especially if you're naively assuming that C++ is a syntactic and semantic superset of C (neither of which is actually true).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.