Skip to Content
FreeTool
  • Home
  • Forum
  • Contact us
  • PDF tools
    • Compress PDF
    • Organised PDF
    • Image to PDF
    • Merge PDFs
    • Combine to PDF
    • Split PDF
    • Remove PDF pages
    • Unlock PDF
    • PDF to zip
    • Add watermark PDF
    • PDF to JPEG
    • Doc to pdf
    • EXCEL to PDF
    • Pdf master
  • Image Tools
    • Img master
    • Image to webP converter
    • signature-maker
  • Calculator
    • Age calculator
    • BMI calculator
    • Milk Bill calculator
    • SIP Calculator
    • Interest calculator
    • Multi interest calculator
    • Electric bill calculator
  • Developer Tools
    • HTML Editor
    • C++ Compiler
    • Phyton Compiler
    • json formatter
  • World Monitor
    • YouTube & X trends
    • Tv garden
    • Worldometer
    • Trending news
    • Trading Economics
    • Earth weather
    • Radio garden
    • World clock
    • Nobel prize winner
    • Crypto map
  • Space & Science
    • Iss tracker
    • Live Earthquake
    • Flight radar
    • Space gallery
    • ISRO mission
    • NASA mission
    • N2YO feed
    • Eyes on the Earth
    • Asteroid tracker
    • Satellite tracker
    • Upcoming launches
  • Utility
    • Temporary email
    • Password generator
    • QR code Generator
    • Fun facts about you
    • Barcode lookup
    • Word counter
    • YouTube pro
    • youtube-thumbnail-downloader
    • Invisible text
  • Unique sites
    • Unique websites
    • Election service
    • Internet Archive
    • Origin Library
  • About
  • Testing
  • EX Timetable
  • Oscar winners
  • +1 555-555-5556
  • Sign in
  • Contact Us
FreeTool
      • Home
      • Forum
      • Contact us
      • PDF tools
        • Compress PDF
        • Organised PDF
        • Image to PDF
        • Merge PDFs
        • Combine to PDF
        • Split PDF
        • Remove PDF pages
        • Unlock PDF
        • PDF to zip
        • Add watermark PDF
        • PDF to JPEG
        • Doc to pdf
        • EXCEL to PDF
        • Pdf master
      • Image Tools
        • Img master
        • Image to webP converter
        • signature-maker
      • Calculator
        • Age calculator
        • BMI calculator
        • Milk Bill calculator
        • SIP Calculator
        • Interest calculator
        • Multi interest calculator
        • Electric bill calculator
      • Developer Tools
        • HTML Editor
        • C++ Compiler
        • Phyton Compiler
        • json formatter
      • World Monitor
        • YouTube & X trends
        • Tv garden
        • Worldometer
        • Trending news
        • Trading Economics
        • Earth weather
        • Radio garden
        • World clock
        • Nobel prize winner
        • Crypto map
      • Space & Science
        • Iss tracker
        • Live Earthquake
        • Flight radar
        • Space gallery
        • ISRO mission
        • NASA mission
        • N2YO feed
        • Eyes on the Earth
        • Asteroid tracker
        • Satellite tracker
        • Upcoming launches
      • Utility
        • Temporary email
        • Password generator
        • QR code Generator
        • Fun facts about you
        • Barcode lookup
        • Word counter
        • YouTube pro
        • youtube-thumbnail-downloader
        • Invisible text
      • Unique sites
        • Unique websites
        • Election service
        • Internet Archive
        • Origin Library
      • About
      • Testing
      • EX Timetable
      • Oscar winners
    • +1 555-555-5556
    • Sign in
    • Contact Us
    ✥ Drag to Move
    ⚡ Speed
    🎨 Color Mode
    0:00 / 0:00

    Step by Step C++ Beginner Guide

    Table of Contents:

    1. History of C++
    2. Basic Structure of a C++ Program
    3. Step-by-step Explanation
    4. C++ Symbols Table
    5. C++ Identifiers & Basics
    6. C++ Naming Rules
    7. C++ Keywords

    1. History of C++

    Creator: Bjarne Stroustrup
    Year: Started in 1979, first released in 1985
    Why Created:
    C language was very fast but lacked some features like classes, objects, data security.
    Bjarne wanted a language with both speed of C and features of Object-Oriented Programming (OOP).
    Use:
    System software (like operating systems)
    Game development
    Browsers (e.g., Chrome uses C++)
    Database engines (MySQL, MongoDB)
    Embedded systems


    2. Basic Structure of a C++ Program

    #include 
    using namespace std;
    
    int main() {
        cout << "Hello, World!" ;
        return 0;
    }
    

    3. Step-by-step Reading and Explanation

    Line 1: #include
    Read as: "Hashtag include iostream"
    (called "hash" or "preprocessor symbol") → tells compiler to include something before compilation.
    include → means add a library.
    → this is a header file (input-output stream), it allows us to use cin (input) and cout (output).
    Meaning: "Bring tools for input and output into my program."

    Line 2: using namespace std;
    Read as: "using namespace standard semicolon"
    using → tells compiler we want to use something.
    namespace → is like a box of code (a collection).
    std → short for standard (the default box of code).
    ; → semicolon ends a statement (like a full stop in English).
    Meaning: "Use the standard C++ tools without writing std:: every time."

    Line 3: int main() {
    Read as: "int main open round bracket close round bracket open curly bracket"
    int → return type (function will give an integer number at end).
    main → the starting point of every C++ program (execution begins here).
    () → parentheses (means no input parameters given here).
    { → curly bracket opens → start of function body.
    Meaning: "Here begins the main program."

    Line 4: cout << "Hello, World!";
    Read as: "see-out shift-left double-quote Hello World double-quote semicolon"
    cout → character output (used to print on screen).
    << → "insertion operator" (sends data to output).
    "Hello, World!" → string (text inside double quotes).
    ; → end of command.
    Meaning: "Print Hello, World! on the screen."

    Line 5: return 0;
    Read as: "return zero semicolon"
    return → send a value back.
    0 → means successful execution (no error).
    ; → statement end.
    Meaning: "Tell the operating system program ended successfully."

    Line 6: }
    Read as: "close curly bracket"
    Ends the main function.
    Meaning: "Program finished here."


    4. 🔣 C++ Symbols — How to Read & Meaning

    SymbolRead AsMeaning
    #Hashtag / SharpPreprocessor instruction (#include)
    ;SemicolonEnd of a statement
    {Curly bracket openStart of a block/function/class
    }Curly bracket closeEnd of a block/function/class
    ()Round bracket open/closeFunctions, conditions, arguments
    []Square bracket open/closeArrays / indexing
    <<Less than less thanInsert data into output (cout)
    >>Greater than greater thanExtract data from input (cin)
    " "Double quoteDenotes a string
    ' 'Single quoteDenotes a single character
    //Double slashSingle-line comment
    /* ... */Slash-star … star-slashMulti-line comment
    =EqualsAssignment operator
    + - * / %Plus, minus, multiply, divide, moduloArithmetic operations
    ++Plus plusIncrement by 1
    --Minus minusDecrement by 1
    ==Equals equalsCheck equality
    !=Not equalCheck inequality
    < > <= >=Comparison operatorsLess than / Greater than / Less equal / Greater equal
    &&AndLogical AND
    ||OrLogical OR
    !NotLogical NOT
    :ColonUsed in labels, ternary operator, inheritance
    ?:Question mark colonTernary operator (if-else in one line)
    .DotAccess object member
    ->ArrowAccess pointer object member
    ::Double colonScope resolution (std::cout)
    \nBackslash nNew line
    \tBackslash tTab / spacing

    5. 🆔 C++ Identifiers & Basics — Beginner Friendly Guide

    1. What is an Identifier?

    An identifier is a name you give to anything in C++ like variables, functions, classes, objects, constants, etc. It helps you refer to that item in your program.

    2. What is a Data Type?

    A data type tells the computer what kind of value a variable can store.

    int age = 18;
    float salary = 5000.5;
    char grade = 'A';
    

    👉 age, salary, grade = identifiers
    👉 int, float, char = data types
    👉 18, 5000.5, 'A' = values

    3. What is an Operator?

    Operators are symbols that perform operations on data.

    • + → Addition
    • - → Subtraction
    • * → Multiplication
    • / → Division
    • = → Assignment

    4. What is a Value?

    A value is the actual data stored in a variable.

    18, 3.14, 'A', 5000
    

    5. What is a Keyword?

    Keywords are reserved words in C++ that have a special meaning and cannot be used as identifiers.

    int, float, char, 
    if, else, return
    

    6. 📝 C++ Naming Rules — Complete Step-by-Step Guide

    1. General Rules for All Identifiers

    • Names must begin with a letter (A–Z, a–z) or underscore (_).
    • Names can contain letters, digits (0–9), and underscores.
    • Names cannot start with a digit.
    • Names cannot use spaces or special characters (@, $, %, -).
    • Names cannot be a C++ keyword (like int, for).
    • C++ is case-sensitive → Value and value are different.
    • Names should be meaningful for readability.
    // ✅ Correct
    int age;
    float monthly_salary;
    char gradeA;
    
    // ❌ Wrong
    int 1value;   // cannot start with number
    float salary$; // invalid symbol
    char for;       // keyword not allowed
    

    2. Variable Naming Rules

    RuleExample ✅Bad ❌
    Use lowercase or camelCasestudentAgex
    Can use underscore for claritytotal_salaryts

    3. Constant Naming Rules

    • Use ALL_CAPS with underscores for constants.
    const double PI_VALUE = 3.1416;
    const int MAX_STUDENTS = 100;
    

    4. Function Naming Rules

    • Use camelCase or snake_case.
    • Name should describe an action.
    int addNumbers(int a, int b) {
        return a + b;
    }
    

    5. Class & Object Naming Rules

    EntityConventionExample
    ClassPascalCaseStudentRecord
    ObjectcamelCasestudent1
    class CarModel {
       public:
       void startEngine() {}
    };
    
    CarModel myCar;
    

    6. Array Naming Rules

    • Arrays should be plural.
    int marks[5];
    string names[10];
    

    7. Pointer & Reference Naming Rules

    • Pointers: use p or ptr prefix.
    • References: use ref suffix.
    int value;
    int* pValue = &value;
    int& valueRef = value;
    

    8. Namespace Naming Rules

    • Use lowercase for namespaces.
    namespace school {
        int students = 50;
    }
    

    9. Enum Naming Rules

    • Enum type: PascalCase
    • Enum values: ALL_CAPS
    enum Color { RED, GREEN, BLUE };
    

    10. Template Naming Rules

    • Use single capital letters (T, U, V) for template parameters.
    template <typename T>
    class Box {
        T value;
    };
    

    11. Label Naming Rules

    • Labels should be simple and descriptive.
    startLoop:
    for (int i = 0; i < 5; i++) {
        if (i == 3) goto startLoop;
    }
    

    12. Typedef / Using Naming Rules

    typedef unsigned int uint;
    using Age = int;
    

    13. Macro Naming Rules

    • Use ALL_CAPS for macros.
    #define PI 3.14159
    #define MAX 100
    

    7. 🔑 Complete C++ Keywords (with Meanings)

    C++ keywords are reserved words. They cannot be used as identifiers (variable names, class names, etc.). Here’s the latest list with meanings (C++98 → C++11 → C++20 → C++23).

    1. Data Types

    KeywordMeaning
    boolBoolean type (true/false)
    charCharacter type (1 byte)
    char8_tUTF-8 character type (added in C++20)
    char16_tUTF-16 character type (added in C++11)
    char32_tUTF-32 character type (added in C++11)
    intInteger type
    longLong integer
    shortShort integer
    signedSigned modifier (can be + or -)
    unsignedUnsigned modifier (only positive)
    floatSingle-precision floating number
    doubleDouble-precision floating number
    voidNo return / empty type
    wchar_tWide character type

    2. Storage Class & Type Modifiers

    KeywordMeaning
    constConstant (cannot change value)
    volatilePrevents compiler optimization
    mutableAllows modification inside const object
    autoType deduced automatically
    registerSuggest store in CPU register (deprecated)
    staticPreserves value between function calls
    externVariable defined outside file
    thread_localEach thread has its own instance

    3. Control Flow

    KeywordMeaning
    if, elseConditional branching
    switch, case, defaultMulti-branch selection
    while, do, forLooping statements
    breakExit from loop/switch
    continueSkip current loop iteration
    gotoJump to label (not recommended)
    returnReturn value from function

    4. Functions & Exception Handling

    KeywordMeaning
    try, catch, throwException handling
    noexceptSpecifies function won’t throw exceptions
    operatorDefines custom operator overloading
    explicitPrevents implicit type conversion
    friendAllows access to private members
    inlineSuggests inline expansion of function
    virtualDefines virtual function for polymorphism
    overrideEnsures function overrides base version
    finalPrevents further inheritance/overriding

    5. Object-Oriented Keywords

    KeywordMeaning
    class, struct, unionDefine user-defined types
    enumDefine enumerations
    private, protected, publicAccess specifiers
    thisPointer to current object
    new, deleteDynamic memory allocation & deallocation

    6. Casting Operators

    KeywordMeaning
    dynamic_castSafe downcasting (runtime check)
    const_castModify const-ness
    reinterpret_castConvert one pointer type to another
    static_castCompile-time conversion

    7. Type Information

    KeywordMeaning
    sizeofReturns size of type/variable
    decltypeInfers type of expression
    typeidGives runtime type info
    alignof, alignasMemory alignment

    8. Namespace & Templates

    KeywordMeaning
    namespaceDefines scope grouping
    usingAlias or bring namespace into scope
    templateGeneric programming
    typenameDefines template type parameter
    concept, requiresConstraints in templates (C++20)

    9. Coroutines (C++20)

    KeywordMeaning
    co_awaitSuspends coroutine until ready
    co_yieldProduces a value from coroutine
    co_returnReturns from coroutine

    10. Boolean & Literals

    KeywordMeaning
    true, falseBoolean constants
    nullptrNull pointer literal (C++11)

    11. Alternative Operator Keywords

    C++ also provides alternative spellings for operators:

    KeywordEquivalent
    and&&
    or||
    not!
    bitand&
    bitor|
    xor^
    compl~
    and_eq&=
    or_eq|=
    xor_eq^=
    not_eq!=

    🔢 Total Keywords

    C++98: 64 keywords
    C++11: +10 new
    C++20: +7 new
    C++23: +2 new
    Alternative Operators: 11

    ✅ Total Reserved Keywords = 94

    Useful Links

    PDF Tools

    Scan to PDF Compress PDF Organised PDF Image to PDF Merge PDFs Combine to PDF Split PDF Remove PDF Pages Unlock PDF Img Master PDF to Zip Add Watermark PDF PDF to JPEG Doc to PDF PPT to PDF Excel to PDF PDF Master

    Image Tools

    Img Master Image to WebP Signature Maker

    Calculator

    Age Calculator BMI Calculator Milk Bill Calculator SIP Calculator Interest Calculator Multi Interest Calc Electric Bill Calc

    Developer Tools

    HTML Editor C++ Compiler Python Compiler JSON Formatter

    World Monitor

    YouTube & X Trends Tv Garden Worldometer Trending News Trading Economics Earth Weather Radio Garden World Clock Nobel Prize Winner Crypto Map

    Space & Science

    Iss Tracker Live Earthquake Flight Radar Space Gallery ISRO Mission NASA Mission N2YO Feed Eyes on the Earth Asteroid Tracker Satellite Tracker Upcoming Launches

    Utility

    Temporary Email Password Generator QR Code Generator Fun Facts About You Barcode Lookup Word Counter Thumbnail Downloader Invisible Text

    Unique Sites

    Unique Websites Election Service Internet Archive Origin Library About Us Contact Us Community Forum
    • Home
    • About us
    • Products
    • Services
    • Legal
    • Contact us
    About us

    FreeTool is your all-in-one platform for fast, reliable, and free online tools — for everyday users, learners & curious minds. Created and managed by @⁨AβHIJΣΣT⁩. From tracking real-time data like earthquakes, satellites, and weather to using powerful calculators, coding  compiler, powerfull PDF tools,crypto tools, and fun educational utilities — everything is just one click away.

    Whether you're a student, developer, researcher, or casual user, FreeTool helps you save time with 50+ smart utilities — no signup, no clutter. Tools are updated regularly for performance and accuracy.

    Explore trending PDF Toold,YouTube/X data, space missions, QR generators, world stats, and more — all built with care by Abhijeet.


    Visit FreeTool.odoo.com — one powerful hub, built for everyone.

    Connect with us
    • Contact us
    • info@yourcompany.example.com
    • +1 555-555-5556
    Follow us
    Click here to setup your social networks

                      

                        ©Copyright by Abhijeet™