answersLogoWhite

0

Yes. cpp is merely a convention to differentiate C++ source code from C source code, just as hpp is used to differentiate C++ header files from C header files (*.h). But they are just conventions, not rules: you can use any extension you like for both header and source files. For example, there's nothing to prevent you using the cpp extension for a header file. However, using the conventions makes it much easier to organise and recognise your files.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

How does a compiler interpret the difference between c and c plus plus?

from the extension of your file.If it has an extension of .cpp then it is a c++ programIf it's extension is .c, then it is a C program.


What is extension part of c plus plus?

C++ Extension Name is... Syntax is: File Name.extension name. Ex: ankit.cpp


Where did C plus plus program come from?

C++ is an extension of C, and was invented by Bjarne Stroustrup.


What c plus plus program must be saved in a text with the extension cpp?

The .cpp extension is merely conventional; it is not required by the C++ standard. You can actually use any file extension you wish.


Where can one download MSN Plus?

MSN plus is a windows messenger extension. You can download the program for free from MSN. Most windows now come with this program built in but if not visit MSN.


Is it possible to immediately run your C plus plus program without compiling it?

No.


Is it possible to learn c plus plus without learning c?

No. C++ is an extension of C. By the time you learn C++, you have learned C.


What is the name of Hertz loyalty program?

The name of Hertz loyalty program is Hertz Gold Plus Rewards.


How do you include userdefined headerfiles in c plus plus program?

#include "what-its-name-is.h"


How do you write a program in C plus plus plus plus How do you write a program in C to swap two variables without using the third oneo swap two variables without using the third one?

To swap two variables without using a third variable, use exclusive or manipulation... a ^= b; b ^= a; a ^= b;


How do you link a C plus plus program to C functions?

It should work without any special action.


What is difference between iostream and iostreamh in c plus plus?

<iostream.h> is an old style of programming and does not allow using namespaces. If you use <iostream> you can use namespaces, and limit number of predefined function (not used) included with your program.