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

Recommended Answers

All 2 Replies

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.

> 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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.