Home : File Types : CPP File

.CPP File Extension

File TypeC++ Source Code File

DeveloperStandard C++ Foundation
Popularity
4.2 (189 Votes)
CategoryDeveloper Files
FormatText

What is a CPP file?

A CPP file is a source code file written in C++, a popular programming language that adds features such as object-oriented programming to C. It may be a standalone program, containing all the code, or one of many files referenced in a development project. CPP files must be compiled by a C++ compiler for the target platform before the code can be run.

More Information
Screenshot of a .cpp file in Microsoft Visual Studio Code 1.54
CPP file open in Microsoft Visual Studio Code 1.54

C++ is one of the most popular programming languages, making CPP files very common among developers. It was created by Bjarne Stroustrup and was first released in 1985 to improve upon the C programming language.

It was initially standardized by the International Organization for Standardization (ISO) in 1998 and has undergone many improvements over the years. It is maintained by ISO/IEC JTC1 / SC22 / WG21 with the non-profit Standard C++ Foundation providing support for the C++ software developer community.

If you are a programmer, you most likely have worked with CPP files since C++ is used to develop many applications, such as games, web browsers, and database software. Some notable applications written completely or partially in C++ include Microsoft Office, Adobe Photoshop, MYSQL, Google Chrome, Mozilla Firefox, Autodesk Maya.

NOTE: C++ source code may also be saved as .C, .CC, and .CXX files, or as .HPP, .H, .HH, or .HXX header files.

Common CPP Filenames

main.cpp - The source code filename typically used for the main() function of a C++ program, where the program begins execution.

How do I open a CPP file?

You can open and edit CPP files with various source code editors, including Microsoft Visual Studio Code (multiplatform), Code Blocks (multiplatform), and Apple Xcode (macOS). These applications provide syntax highlighting, auto-completion, and other helpful tools that are helpful for viewing and editing C++ code.

You can also open and edit CPP files with a plain text editor, such as Microsoft Notepad (bundled with Windows) or Apple TextEdit (bundled with macOS). However, these text editors do not provide helpful source code editing features.

C++ compilers

You can compile the C++ code stored in CPP files to code that can be run on a computer with various free and commercial compilers. Some compilers include Microsoft Visual Studio (Windows), Eclipse IDE for C Developers (multiplatform), GNU Compiler Collection (multiplatform), and Apple Xcode (macOS).

FREE DOWNLOAD
Open and view .CPP files with File Viewer Plus.

Programs that open CPP files

Updated 3/18/2021

About CPP Files

Our goal is to help you understand what a file with a *.cpp suffix is and how to open it.

The C++ Source Code file type, file format description, and Mac, Windows, Linux, and Android programs listed on this page have been individually researched and verified by the FileInfo team. We strive for 100% accuracy and only publish information about file formats that we have tested and validated.

If you would like to suggest any additions or updates to this page, please let us know.