Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

is it possible to put C++ code in a '.c' file?

$
0
0
hi friends,

as far as i know (may be i'm wrong) file with a .c file extension can have only 'c' and not 'c++' code. But recntly i've downloaded some code files with the extension '.c' (they were written for design pattern handling). But they have classes in them (i.e only C++ code has classes not C code).
1. How come it is possible to have C++ code in file with the extension '.c'?
2. How does the compiler comprehend this?

i'm confused ... please help!

cheers

Viewing all articles
Browse latest Browse all 2703

Trending Articles