Connecting Tech Pros Worldwide Forums | Help | Site Map

what kind of c file is it

QQ
Guest
 
Posts: n/a
#1: Jul 23 '05
if the file name is *.cc

Thanks a lot!


Victor Bazarov
Guest
 
Posts: n/a
#2: Jul 23 '05

re: what kind of c file is it


QQ wrote:[color=blue]
> if the file name is *.cc[/color]

It's usually not a C file at all. Most likely it's a C++ translation
unit. Can you open it and look at it? What does it look like?

V
Rolf Magnus
Guest
 
Posts: n/a
#3: Jul 23 '05

re: what kind of c file is it


QQ wrote:
[color=blue]
> if the file name is *.cc[/color]

The contents of a file don't depend on its name, and the C++ standard
doesn't require special naming for source files. But there are conventions
to mark the content by name. *.cc is a very common file name pattern for
C++ sources. I'm not sure why you're asking. Since you posted the question
in comp.lang.c++, it seems to me that you are actually aware that it's C++.

Stewart Gordon
Guest
 
Posts: n/a
#4: Jul 23 '05

re: what kind of c file is it


QQ wrote:[color=blue]
> if the file name is *.cc
>
> Thanks a lot![/color]

One of various adopted extensions for C++. There are others:
..cpp (probably the most common, but annoyingly one that my version of
tcsh doesn't recognise)
..c (leading to confusion with C)
..C (on case-sensitive file systems)
..c++ (on filesystems that support such names)
..cxx (presumably a kludge for .c++)

I wonder which Bjarne himself uses....

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
Closed Thread