TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    Code Blocks

    Add C++ Source Files in Code::Blocks IDE

    Overview

    In this tutorial, we will learn steps involved to add C++ source files in the Code::Blocks IDE. A C++ Project is a collection of C++ source code files( *.cpp) , C++ header files( *.h) and configuration artefacts.

    Add C++ Source Files

    Choose File >> New >> File… menu option to add files to the project.

    Choose “C/C++ source” Files category and click on the Go button.

    Add C++ Source Code Files CodeBlocks IDE

     

    Select the language selection C++ and click on the Next > button.

     

    C++ Source File Selection

     

     

    Enter the file name and location. Click on the three dots button and browse to the file location. This should be ideally under the project directory. Click on the Save button to create the file.

    Add it to the active project. Check the check box option Add file to active project.

     

    C++ File location and name

     

    Check the Debug and Release build targets.  Click on the All button to select both the build targets.

    Click on the Finish button.

    The source code file would be added to the C++ project. The file would be listed in

    Project >> Sources

    Add Empty File

    We can use the menu option File >> New >> Empty file to add an empty file.

    Click the Yes button in the  Add File to Project dialog box.

    Give a name to the file with the .cpp file extension and save the type as C/C++ files. Click on the Save button.

    The file would be displayed in the code editor. We can add code to the file. That’s it.

    Build C++ Project

    https://www.testingdocs.com/build-c-project-in-codeblocks-ide/

    —

    Code::Blocks Tutorials

    Code::Blocks Tutorials on this website can be found at:

    https://www.testingdocs.com/code-blocks-tutorials/

    For more information on Code::Blocks IDE, visit the official website:

    https://www.codeblocks.org/

    Related Posts

    CodeBlocks Download Win11

    Code Blocks /

    Install CodeBlocks IDE on Windows 11

    Add C Header File CodeBlocks

    Code Blocks /

    Add New C/C++ Header File to Project

    Open Project CodeBlocks

    Code Blocks /

    Open C++ Project in Code::Blocks IDE

    CodeBlocks First Launch Win10

    Code Blocks /

    Launch Code::Blocks IDE on Windows

    Download Code::Blocks

    Code Blocks /

    Download Code::Blocks on Windows

    ‹ Create Console C++ Application in CodeBlocks› Build C++ Project in Code::Blocks IDE

    Recent Posts

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com