Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How Often Should I Book Home Massage in Dubai?

    Everything You Need to Know About Maplezone Sports Institute

    What are the wagering requirements for Bitcoin casino bonuses in Romania?

    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    StarDigits
    • Home
    • Travel
      • Hotels
      • Restaurants
    • Beauty
      • Fashion
      • Lifestyle
    • Casino
    • Real Estate
    Write for us
    StarDigits
    Home » C++ Projects | Top 20 C++ Projects Ideas with Source Code
    Technology

    C++ Projects | Top 20 C++ Projects Ideas with Source Code

    joshhiltondesigns@gmail.comBy joshhiltondesigns@gmail.comJuly 25, 2025Updated:July 27, 2025No Comments24 Mins Read
    Share Facebook Twitter Pinterest Telegram LinkedIn Tumblr Email Copy Link
    Follow Us
    Google News Flipboard
    C++ Projects | Top 20 C++ Projects Ideas with Source Code
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link

    Updated February 10, 2023

    Introduction to C++ Projects

    C++ is a programming language that can have various features concerning C language, the essential part is that it assists object-oriented programming concepts, which can provide new features to the programming language, and C++ projects can run with the help of the C++ compiler, which we can able to use Turbo C, Code Lite, so we need to download the source code and compile it. C++ project can be beneficial because it can access the standard template library and functions with memory allocation and de-allocation flexibly.

     

     

    C++ ProjectsC++ Projects | Top 20 C++ Projects Ideas with Source Code

    Top 20 C++ Projects Ideas with Source Code

    Given below are the 20 C++ projects ideas with source code:

    1. Book-Shop Management System

    Building such an application will let us know about customers and display books which will assist in changing their books; the application will be user-friendly and easy to use.

    Code:

    #include 
    #include 
    #include 
    #include 
    #include 
    #define HOST "127.0.0.1"
    #define USER "root"
    #define PASS
    #define DATABASE "Management"
    #define PORT 3306
    #define PASSWORD
    using namespace stand;
    MYSQL * conn;
    MYSQL_RES *res_set;
    MYSQL_ROW row;
    stringstream stmt;
    const char * q;
    string query;
    typedef struct
    {
      int date;
      int month;
      int year;
    }date;
    class books
    {
      int id; // Primary Key
      string name;
      string auth;
      int price;
      int qty;
    public:
      void add();
      void update_price();
      void search();
      void update();
      void display();
    };
    class suppliers
    {
      int id; //Primary Key
      string name;
      long int phn;
      string addr_line1;
      string addr_line2;
      string addr_city;
      string addr_state;
    public:
      void add_sup();
      void remove_supplier();
      void search_id();
    };
    class purchases
    {
      int ord_id;
      int book_id;
      int sup_id;
      int qty;
      date dt_ordered;
      int eta;
      char received;
      int inv;
    public:
      void new_ord();
      void view();
      void mar_cancel();
      void mark_reciv();
    };
    class employees
    {
      int id;
      string name;
      string addr_line1;
      string addr_line2;
      string addr_city;
      string addr_state;
      long int phn;
      date date_of_joining;
      long int salary;
      string mgr_status;
    public:
      void add_emp();
      void search_emp();
      void assign_mgr_stat();
      void display();
      void update_sal();
    };
    class members
    {
     int id;
      string name;
      string addr_line1;
      string addr_line2;
      string addr_city;
      string addr_state;
      long int phn;
      date beg_date;
      date end_date;
      string valid;
    public:
      void add_mem();
      void refresh();
      void search_mem();
    };
    class sales
    {
      int invoice_id;
      int member_id;
      int book_id;
      int qty;
      int amount;
      date date_s;
    public:
      void add();
      void find_total_sales();
    };
    void books::add()
    {
      cout << "Enter the name of the book : " ;
      cin >> name;
      cout << "Enter the name of the author : ";
      cin >> auth;
      cout << "Enter the Price : ";
      cin >> price;
      cout << "Enter the Qty Recived : ";
      cin >> qty;
      stmt.str("");
      stmt << "Insert into books(name,auth,price,qty) values('" << name << "','" << auth << "'," << price << "," << qty << ");";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if (!(res_set))
      cout << endl << endl << "Book Record Inserted Successfully" << endl << endl << endl;
      else
      cout << endl << endl << "Entry ERROR !" << endl << "Contact Technical Team " << endl << endl << endl;
    }
    void books::update_price()
    {
      char choice;
      cout << "Enter the id of the book for update in price : ";
      cin >> id;
      stmt.str("");
      stmt << "Select name,price from books where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if((row = mysql_fetch_row(res_set)) != NULL)
      {
       cout << "The Name of the book is : " << row[0] << endl ;
       cout << "The current price of the book is : " << row[1] << endl ;
       cout << "Do you Want to Update the Price [y/n] : " ;
       cin >> choice;
        if (choice == 121 || choice == 89)
        {
          cout << "Enter the new price : ";
          cin >> price;
          stmt.str("");
           stmt << "Update books set price = " << price << " where id = " << id << ";";
           res_set = mysql_store_result(conn);
          if (!(res_set))
          cout << endl << endl << "Book Price Updated Successfully" << endl << endl << endl;
         else
         cout << endl << endl << "Entry ERROR !" << endl << "Contact Technical Team " << endl << endl << endl;
          }
         else
         {
           cout << "No changes Made!!";
         }
    }
    else
    {
           cout << "No Book found!!!";
       }
    }
    void books::search()
    {
         cout << "Enter book id for details : ";
         cin >> id;
       stmt.str("");
       stmt << "Select * from books where id = " << id << ";";
       query = stmt.str();
       q = query.c_str();
       mysql_query(conn,q);
       res_set = mysql_store_result(conn);
       if((row = mysql_fetch_row(res_set)) != NULL)
    {
       cout << "The Details of Book Id " << row[0] << endl;
       cout << "The Name of the book is : " << row[1] << endl ;
       cout << "THE Author of " << row[1] << " is " << row[2] << endl;
       cout << "The Price of the book is : " << row[3] << endl ;
       cout << "The inventory count is " << row[4] << endl;
    }
    else
    {
       cout << "No record Found" << endl;
      }
    }
    void books::update()
    {
       int b_id[100],qty[100],i = 0,max;
       stmt.str("");
       stmt << "Select book_id,qty from purchases where recieves="T" and inv IS NULL;";
       query = stmt.str();
       q = query.c_str();
       mysql_query(conn,q);
       res_set = mysql_store_result(conn);
       stmt.str("");
       stmt << "Update purchases set inv = 1 where recieves="T" and inv IS NULL;";
       query = stmt.str();
       q = query.c_str();
       mysql_query(conn,q);
       while((row = mysql_fetch_row(res_set)) != NULL)
       {
         b_id[i] = (int) row[0];
         qty[i] = (int) row[1];
         i++;
       }
       max = i;
       for(i = 0; i <= max; i++)
       {
        stmt.str("");
      stmt << "update books set qty = " << qty[i] << " where id = " << b_id[i] << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
     }
     cout << "The orders recieved have been updated.";
    }
    void books::display()
    {
      int i = 0;
      query = "Select * from books;";
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      while((row = mysql_fetch_row(res_set)) != NULL)
      {
        cout << "Name for book " << ++i << " : " << row[1] << endl;
        cout << "Name of Author : " << row[2] << endl;
        cout << "Price : " << row[3] << endl;
        cout << "Quantity : " << row[4] << endl;
        cout << endl << endl << endl << endl ;
      }
    }
    void suppliers::add_sup()
    {
      cout << "Enter the Supplier Name : ";
      cin >> name;
      cout << "Enter Phone no. : ";
      cin >> phn;
      cout << "Enter the address (in 3 lines) : ";
      cin >> addr_line1;
      cin >> addr_line2;
      cin >> addr_city;
      cout << "Enter State : ";
      cin >> addr_state;
      stmt.str("");
      stmt << "Insert into suppliers(name,phone_no,addr1,addr2,addr_city,addr_stat) values('" << name << "'," << phn << ",'" << addr_line1 << "','" << addr_line2 << "','" << addr_city << "','" << addr_state << "');";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if (!(res_set))
      cout << endl << endl << "Supplier Record Inserted Successfully" << endl << endl << endl;
    else
      cout << endl << endl << "Entry ERROR !" << endl << "Contact Technical Team " << endl << endl << endl;
    }
    void suppliers::remove_supplier()
    {
      cout << "Enter the supplier id to remove the Supplier : ";
      cin >> id;
      stmt.str("");
      stmt << "Delete from suppliers where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << "Supplier Removed.";
     }
    void suppliers::search_id()
    {
      cout << "Enter the supplier id to find the Supplier details : ";
      cin >> id;
      stmt.str("");
      stmt << "Select * from suppliers where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if((row = mysql_fetch_row(res_set)) != NULL)
      {
        cout << "Details of Supplier Id : " << row[0] << endl;
        cout << "Name : " << row[1] << endl;
        cout << "Phone no. : " << row[2] << endl;
        cout << "Address Line 1 : " << row[3] << endl;
        cout << "Address Line 2 : " << row[4] << endl;
        cout << "City : " << row[5] << endl;
        cout << "State : " << row[6] << endl;
    }
    else
    {
        cout << "No Supplier Found!!";
      }
    }
    void purchases::new_ord()
    {
      cout << "Enter the book Id : ";
      cin >> book_id;
      cout << "Enter Supplier Id : ";
      cin >> sup_id;
      cout << "Enter the Quantity : ";
      cin >> qty;
      cout << "Estimated expected Delivery (in days) : ";
      cin >> eta;
      stmt.str("");
      stmt << "Insert into purchases (book_id,sup_id,qty,dt_ord,eta) values ( " << book_id << "," << sup_id << "," << qty << ",curdate(),Date_add(curdate(), INTERVAL " << eta << " DAY)" << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << "New order Added!!";
    }
    void purchases::mark_reciv()
    {
      cout << "Enter the order id for order recieved : ";
      cin >> ord_id;
      stmt.str("");
      stmt << "Update puchases set recieved = 'T' where ord_id = " << ord_id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << "Recieved Marked successfully";
    }
    void purchases::mar_cancel()
    {
      cout << "Enter the order id for order cancelled : ";
      cin >> ord_id;
      stmt.str("");
      stmt << "Update puchases set recieved = 'C' where ord_id = " << ord_id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << "Cancelled Marked successfully";
    }
    void purchases::view()
    {
      int c;
      cout << "Select an Option" << endl;
      cout << "1. View orders not Recieved" << endl;
      cout << "2. View orders Cancelled" << endl;
      cout << "3. View orders Recieved" << endl;
      cout << "Enter Your choice : ";
      cin >> c;
      if (c == 1)
         received = 'F';
       else if (c == 2)
         received = 'C';
        else if (c == 3)
         received = 'T';
    else
        return;
       stmt.str("");
       stmt << "Select * from purchases where recieved = '" << received << "';";
       query = stmt.str();
       q = query.c_str();
       mysql_query(conn,q);
       res_set = mysql_store_result(conn);
       if (c == 1)
          cout << endl << "Orders not recieved are" << endl;
        else if (c == 2)
          cout << endl << "Orders Cancelled are" << endl;
        else if (c == 3)
         cout << endl << "Orders recieved are" << endl;
       while((row = mysql_fetch_row(res_set)) != NULL)
       {
        cout << endl;
        cout << "Order Id : " << row[0] << endl;
        cout << "Book Id : " << row[1] << endl;
        cout << "Supplier Id :" << row[2] << endl ;
        cout << "Quantity : " << row[3] << endl;
        cout << "Date Ordered : " << row[4] << endl;
        cout << "Estimated Delivery date : " << row[5] << endl;
        cout << endl << endl << endl;
       }
        cout <> id ;
      stmt.str("");
      stmt << "Select mgr_stat from employees where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if ((row = mysql_fetch_row(res_set)) == NULL)
      {
        cout << "Employee Not Found!!" << endl << endl << endl;
        return;
    }
    else
    {
        mgr_status = (char*) row[0];
        if (mgr_status == "T")
        {
          cout << "You Do Not have Manager Rights!!!" << endl << endl ;
          return;
        }
      }
      cout << "Enter The details of new employees!!";
      cout << "Enter The name of the employee : ";
      cin >> name;
      cout << "Enter the Address (in 3 lines) : " << endl;
      cin >> addr_line1;
      cin >> addr_line2;
      cin >> addr_city;
      cout << "Enter State : ";
      cin >> addr_state;
      cout << "Enter phone no.";
      cin >> phn;
      cout << "Enter the salary : ";
      cin >> salary;
      stmt.str("");
      stmt << "Insert into employees (name,addr1,addr2,addr_city,addr_stat,phone_no,doj,salary) values ('" << name << "','" << addr_line1 << "','" << addr_line2 << "','" << addr_city << "','" << addr_state << "'," << phn << ",curdate()," << salary << ");";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << endl << endl << "Employee Added Succesfully!" << endl << endl << endl;
    }
    void employees::assign_mgr_stat()
    {
      cout << "Enter Your Id for verification : ";
      cin >> id ;
      stmt.str("");
      stmt << "Select mgr_stat from employees where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if ((row = mysql_fetch_row(res_set)) == NULL)
      {
      cout << "Employee Not Found!!" << endl << endl << endl;
      return;
    }
    else
    {
       mgr_status = (char*) row[0];
       if (mgr_status == "T")
       {
         cout << "You Do Not have Manager Rights!!!" << endl << endl ;
         return;
        }
      }
      cout << "Enter the employee id to grant Manager status : ";
      cin >> id;
      stmt.str("");
      stmt << "update employees set mgr_stat="T" where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << endl << endl << endl;
      cout << "Manager Status granted";
      cout << endl << endl << endl;
    }
    void employees::search_emp()
    {
      cout << "Enter the id for searching an employee : ";
      cin >> id ;
      stmt.str("");
      stmt << "Select * from employees where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if ((row = mysql_fetch_row(res_set)) != NULL)
    {
        cout << "Employees Details" << endl ;
        cout << "Name : " << row[1] <> id ;
      cout << "Enter the updated salary : ";
      cin >> salary;
      stmt.str("");
      stmt << "Update employees set salary = " << salary << " where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      cout << endl << endl << endl << endl;
      cout << "Salary update Successfully";
      cout << endl << endl << endl << endl;
    }
    void members::add_mem()
    {
      cout << "Enter the name of the member : ";
      cin >> name;
      cout << "Enter phone no. : ";
      cin >> phn;
      cout << "Enter address (in 3 lines)" << endl;
      cin >> addr_line1;
      cin >> addr_line2;
      cin >> addr_city;
      cout << "Enter the name of the state : " ;
      cin >> addr_state;
      stmt.str("");
      stmt << "insert into members(name,addr1,addr2,addr_city,addr_stat,phone_no,beg_date,end_date) values ('" << name << "','" << addr_line1 << "','" << addr_line2 << "','" << addr_city << "','" << addr_state << "'," << phn << ",curdate(),Date_add(curdate(), INTERVAL 1 YEAR));";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      stmt.str("");
      stmt << "Select id from members where phone_no = " << phn << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      row = mysql_fetch_row(res_set);
      cout << endl << endl << endl << endl;
      cout << "Member Added successfully" << endl << endl <<"Member Id : " << row[0];
      cout << endl << endl << endl << endl;
     }
    void members::refresh()
    {
      query = "Update members set valid = 'invalid' where end_date <= curdate();";
      q = query.c_str();
      mysql_query(conn,q);
    }
    void members::search_mem()
    {
      cout << "Enter member id : ";
      cin >> id;
      stmt.str("");
      stmt << "Select * from members where id = " << id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if ((row = mysql_fetch_row(res_set)) != NULL)
    {
      cout << "Member Details" << endl ;
      cout << "Name : " << row[1] << endl;
      cout << "Address : " << endl << row[2] << endl << row[3] << endl << row[4] << endl;
      cout << "State : " << row[5] << endl;
      cout << "Contact no. : " << row[6] << endl;
      cout << "Membership begin date : " << row[7] << endl;
      cout << "Membership end date : " << row[8] << endl;
      cout << "Membership Status : " << row[9] << endl << endl << endl;
    }
    else
    {
      cout << "No Member Found!!" << endl << endl << endl;
     }
    }
    void sales::add()
    {
      cout << "Enter Menber id :";
      cin >> member_id;
      cout << "Enter the book id : ";
      cin >> book_id;
      cout << "Enter the quantity : ";
      cin >> qty;
      stmt.str("");
      stmt << "select price*" << qty << " from books where id = " << book_id << ";";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if ((row = mysql_fetch_row(res_set)) != NULL)
    {
      cout << "The bill amount : " << row[0] << endl << endl;
      amount = (int) row[0];
    }
    else
    {
      cout << "Book Id invalid!!" << endl;
      getch();
      return;
    }
      stmt.str("");
      stmt << "insert into sales(mem_id,book_id,qty,amt,sales_date) values (" << member_id << "," << book_id << "," << qty << "," << amount << ",curdate());";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      stmt.str("");
      stmt << "select inv_id from sales where mem_id = " << member_id << " AND book_id = " << book_id << " AND qty = " << qty << " AND sales_date = curdate();";
      query = stmt.str();
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if((row = mysql_fetch_row(res_set)) != NULL)
      {
        cout << "The Invoice id for the bill is " << row[0] << endl << endl << endl;
    }
    else
    {
        cout << "The entered details maybe wrong." << endl << "Please Recheck and Enter again" << endl << endl << endl;
      }
    }
    void sales::find_total_sales()
    {
      query = "select sum(amt) from sales where year(sales_date) = year(curdate());";
      q = query.c_str();
      mysql_query(conn,q);
      res_set = mysql_store_result(conn);
      if((row = mysql_fetch_row(res_set)) != NULL)
      {
        cout << "Total sales this year : " << row[0] << endl << endl << endl << endl;
     }
    }
    void book_menu();
    void sup_menu();
    void pur_menu();
    void emp_menu();
    void mem_menu();
    void sal_menu();
    void main_menu()
    {
      int c;
      cout << "********************************************" << endl;
      cout << " BOOKSHOP MANGEMENT SYSTEM" << endl;
      cout << "*************************************************" << endl;
      cout << " 1. BOOKS" << endl;
      cout << " 2. SUPPLIERS" << endl;
      cout << " 3. PURCHASES" << endl;
      cout << " 4. EMPLOYEES" << endl;
      cout << " 5. MEMBERS" << endl;
      cout << " 6. SALES" << endl;
      cout << " 7. EXIT" << endl << endl << endl;
      cout << "Enter Your Choice : ";
      cin >> c;
      switch (c)
    {
       case 1:
            system("cls");
            book_menu();
            getch();
            break;
    case 2:
           system("cls");
           sup_menu();
           getch();
           break;
    case 3:
          system("cls");
          pur_menu();
          getch();
          break;
    case 4:
          system("cls");
          emp_menu();
          getch();
          break;
    case 5:
         system("cls");
        mem_menu();
        getch();
        break;
    case 6:
          system("cls");
          sal_menu();
          getch();
          break;
    case 7:
         exit(1);
    default:
        system("cls");
       cout << "Wrong Input" << endl << endl << "Invalid input";
       getch();
       break;
      }
      return;
    }
    void book_menu()
    {
       int c;
       books b;
       cout << "*************************************************" << endl;
       cout << " BOOK MENU" << endl;
       cout << "*************************************************" << endl;
       cout << " 1. ADD" << endl;
       cout << " 2. UPDATE PRICE" << endl;
       cout << " 3. SEARCH" << endl;
       cout << " 4. UPDATE STATUS" << endl;
       cout << " 5. DISPLAY ALL" << endl;
       cout << " 6. RETURN TO MAIN MENU" << endl << endl << endl;
       cout << "Enter Your Choice : ";
       cin >> c;
       switch (c)
       {
    case 1:
         b.add();
         break;
    case 2:
         b.update_price();
         break;
    case 3:
        b.search();
        break;
    case 4:
          b.update();
         break;
    case 5:
         b.display();
         break;
    case 6:
         return;
         break;
    default:
          cout << "Wrong Input" << endl << "Invalid input";
          break;
        }
        return;
    }
    void sup_menu()
    {
      int c;
      suppliers s;
       cout << "***********************************************" << endl;
       cout << " SUPPLIER MENU" << endl;
       cout << "***********************************************" << endl;
       cout << " 1. ADD" << endl;
       cout << " 2. REMOVE" << endl;
       cout << " 3. SEARCH" << endl;
       cout << " 4. RETURN TO MAIN MENU" << endl << endl << endl;
       cout << "Enter Your Choice : ";
       cin >> c;
       switch (c)
       {
         case 1:
              s.add_sup();
              break;
         case 2:
             s.remove_supplier();
             break;
         case 3:
            s.search_id();
            break;
         case 4:
              return;
    default:
         cout << "Wrong Input" << endl << "Invalid input";
         break;
      }
    }
    // purchase menu
    void pur_menu()
    {
       int c;
       purchases p;
        cout << "*************************************************" << endl;
        cout << " PURCHASES MENU" << endl;
        cout << "*************************************************" << endl;
        cout << " 1. New Order" << endl;
        cout << " 2. View All" << endl;
        cout << " 3. Cancel Order" << endl;
        cout << " 4. Recieved Order" << endl;
        cout << " 5. RETURN TO MAIN MENU" << endl << endl << endl;
        cout << "Enter Your Choice : ";
        cin >> c;
       switch (c)
       {
          case 1:
               p.new_ord();
               break;
          case 2:
               p.view();
               break;
          case 3:
               p.mar_cancel();
               break;
          case 4:
              p.mark_reciv();
               break;
          case 5:
               return;
           default:
                cout << "Wrong Input" << endl << "Invalid input";
                break;
       }
    }
    void emp_menu()
    {
      int c;
      employees e;
      cout << "*************************************************" << endl;
      cout << " EMPLOYEE MENU" << endl;
      cout << "*************************************************" << endl;
      cout << " 1. New Employee" << endl;
      cout << " 2. Search Employee" << endl;
      cout << " 3. Assign Manager" << endl;
      cout << " 4. View All" << endl;
      cout << " 5. Update Salary" << endl;
      cout << " 6. RETURN TO MAIN MENU" << endl << endl << endl;
      cout << "Enter Your Choice : ";
      cin >> c;
      switch (c)
      {
        case 1:
               e.add_emp();
               break;
        case 2:
               e.search_emp();
               break;
        case 3:
               e.assign_mgr_stat();
               break;
        case 4:
               e.display();
               break;
        case 5:
              e.update_sal();
               break;
        case 6:
              return;
        default:
              cout << "Wrong Input" << endl << "Invalid input";
              break;
      }
    }
    void mem_menu()
    {
      int c;
      members m;
      m.refresh();
      cout << "*************************************************" << endl;
      cout << " MEMBERS MENU" << endl;
      cout << "*************************************************" << endl;
      cout << " 1. New Member" << endl;
      cout << " 2. Search Member" << endl;
      cout << " 3. RETURN TO MAIN MENU" << endl << endl << endl;
      cout << "Enter Your Choice : ";
      cin >> c;
      switch (c)
      {
         case 1:
              m.add_mem();
              break;
         case 2:
              m.search_mem();
              break;
         case 3:
              return;
         default:
               cout << "Wrong Input" << endl << "Invalid input";
               break;
      }
    }
    void sal_menu()
    {
      int c;
      sales s;
      cout << "*************************************************" << endl;
      cout << " SALES MENU" << endl;
      cout << "*************************************************" << endl;
      cout << " 1. Add New Bill" << endl;
      cout << " 2. Total Sales Of The Year" << endl;
      cout << " 3. RETURN TO MAIN MENU" << endl << endl << endl;
      cout << "Enter Your Choice : ";
      cin >> c;
      switch (c)
      {
          case 1:
                s.add();
                break;
          case 2:
                s.find_total_sales();
                break;
         case 3:
               return;
         default:
               cout << "Wrong Input" << endl << "Invalid input";
               break;
       }
    }
    void pass()
    {
       int num = 0 ;
       cout << "Enter password : ";
       for(int i = 0; i < 4; i++)
       {
       num=num*10+(getch()-48);
       cout<<"*";
       }
       if(num == PASSWORD)
       {
         cout << endl << endl << "Correct Password" << endl << endl;
         cout << "Press any key...";
         getch();
    }
    else
    {
       cout << endl << endl << "Incorrect Password" << endl << endl;
       cout << "Press any key...";
       getch();
       exit(1);
    }
    return;
    }
    int main()
    {
       pass();
       conn = mysql_init(0);
       conn = mysql_real_connect(conn, HOST, USER, PASS, DATABASE, PORT, NULL, 0);
      int choice;
      if(conn)
    {
        while(1)
        {
         system("cls");
         main_menu();
        }
    }
    else
    {
       system("cls");
       cout << "Error While connection to database." << endl << "Contact Tech Expert." << endl;
       getch();
       }
      return 0;
    }

    2. Bank Management System

    This project allows us to provide services such as opening the account, showing the account details, depositing, withdrawing, and searching and exiting, through which we can understand the basic banking concept.

    3. Student Record Management System

    This project’s structure can assist in understanding file management, which can have the ready assemble student data.

    4. Contact Management System

    This can be the same as a bank management system in which we can effortlessly build a system to integrate and remove and add contact details with an email address.

    5. Car Rental System

    Everyone is aware of the rental car systems; their services are effortless in our daily life; there is no doubt these are more upgraded, so we can utilize the format text files in C++ for assembling the cab.

    6. Credit Card Validator

    Nowadays, e-commerce is in demand because everyone has credit cards, so most payment gateways can have to validate credit card data before proceeding with the payment.

    7. Sudoku Game

    This game can be available on each phone and laptop, which is most favorable specifically for those interested in solving the puzzles, which can be outlined with the help of game engines, the framework used in all programming languages.

    8. Trading Application

    Nowadays, many businesses are diverging towards the stock exchange and online trading, in which trading can change our life in seconds, news channels are aware of its falls in values, and with the help of C++, great applications can build.

    9. Casino Number Guessing Game

    It is a number-guessing game containing guessing numbers that allow players to place a fixed amount of money for making a bet, and at the end of the game, all money will be given to the winner who guesses the more numbers.

    10. Sales Management System

    It is the most profitable project using C++, which is perfect for learning new things, it contains various classes and sub-classes having multiple features and functions which are related to the product record and billing; it can be mainly outlined to control the customer information, delivery details, and stock details, etc.

    11. Face Detection App

    This project can provide great fun features that can be utilized for face detection by using the OpenCV library, in which the code can capture the face in a few seconds.

    12. Digital Calculator

    This project is especially GUI-driven and easy to implement; it will be a menu-driven program that can provide the output and help build up some of the basic concepts of C++.

    13. Tic-Tac-Toe

    The C++ programming can use for building gaming software with the help of Unreal Engine, in which preparing the game in C++ will help to show our skills in different ways, as this project is rigid to integrate, and it can assist in making use of the algorithms.

    14. Academic Search Engine

    This will be the search engine project that can be outlined to provide detailed academic data and documentation in colleges, allowing the student to view the academic information depending on titles and keywords.

    15. Bike Race Game

    This project will be a specific application game that can use the practice of C++ programming and SDL features in which SDL features can assist us in increasing the game’s aesthetic and outlined features that are accurate and user-defined.

    16. 3D Bounce Ball Game

    The console of it is straightforward and has an excellent explanation of the Open graphics library, and C++ programming, the source for the game in this project is in the project format that can suggest various C++ files; each user can define the header file and function.

    17. Payroll Management System

    This project can keep track of and manage employee payroll events in any organization, which is helpful for financial management companies; it has various classes and subclasses.

    18. Hotel Booking System

    C++ Hotel management project can furnish various functions, from verifying the user’s details for booking the room and changing the information. This project will authorize us to grasp file handling and very evaluative class concepts.

    19. Digital Piano

    The objective of this project is to outline a GUI-based project in which we can enjoy a virtual piano. It may be easy, but many concepts are applied, which are slightly tricky, by merging the more specific functions and dealing with various libraries.

    20. Address Book

    For this project, we need to perceive the data structure through which to handle and function with them; we can join the project with a database in the background for collecting the details.

    Conclusion

    In this article, we have discussed the top 20 C++ projects, which is the best way to learn more about new qualities of the C++ function, which can work on a few fundamental projects which make the resume notable and help to get an idea about the projects and source code.

    Recommended Articles

    This is a guide to C++ Projects. Here, we discuss the introduction and top 20 C++ project ideas with source code. You may also have a look at the following articles to learn more –

    1. C++ user input
    2. C++ thread sleep
    3. C++ Fill()
    4. C++ Back_Inserter

    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    Previous ArticleGone fishin’ with the Tackle Express crew
    Next Article 15 Painting Techniques for Walls to Inspire
    joshhiltondesigns@gmail.com
    • Website

    Related Posts

    The Role of FinTech in Enhancing Transparency and Accountability in Charitable Giving

    July 26, 2025

    Alexandra Eber Inspiring Excellence Passion and Innovation

    July 25, 2025

    Choosing a new career in Santa Clarita

    July 25, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Don't Miss

    How Often Should I Book Home Massage in Dubai?

    By joshhiltondesigns@gmail.comAugust 23, 20250

    Dubai’s fast-paced lifestyle can leave even the most energetic residents drained. Between long working hours,…

    Everything You Need to Know About Maplezone Sports Institute

    What are the wagering requirements for Bitcoin casino bonuses in Romania?

    What’s the Ideal O General AC for Studios in Dubai?

    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo
    Our Picks

    How Often Should I Book Home Massage in Dubai?

    By joshhiltondesigns@gmail.comAugust 23, 20250

    Everything You Need to Know About Maplezone Sports Institute

    By joshhiltondesigns@gmail.comAugust 21, 20250

    What are the wagering requirements for Bitcoin casino bonuses in Romania?

    By joshhiltondesigns@gmail.comAugust 19, 20250

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    Demo
    Advertisement
    Demo
    Latest Posts

    How Often Should I Book Home Massage in Dubai?

    Everything You Need to Know About Maplezone Sports Institute

    What are the wagering requirements for Bitcoin casino bonuses in Romania?

    What’s the Ideal O General AC for Studios in Dubai?

    Trending Posts

    Maersk CEO Vincent Clerc Speaks to ‘Massive Impact’ of the Red Sea Situation

    January 20, 2021

    These Knee Braces Help With Arthritis Pain, Swelling, and Post-Surgery Recovery

    January 15, 2021

    Review: American Music Awards Participants Reviewed

    January 15, 2021

    Subscribe to News

    Get the latest sports news from NewsSite about world, sports and politics.

    About Us
    About Us

    StarDigits brings you well-researched profiles on celebrities, influencers, and public figures. Dive into engaging stories about their careers, lifestyles, and personal journeys, curated for fans and enthusiasts.

    We’re currently inviting new collaboration and partnership opportunities.

    Email Us: admin@yzee.co.uk

    Contact: +971 56 190 5790

    Our Picks

    How Often Should I Book Home Massage in Dubai?

    Everything You Need to Know About Maplezone Sports Institute

    What are the wagering requirements for Bitcoin casino bonuses in Romania?

    Contact Us
    Facebook X (Twitter) Instagram Pinterest
    © 2025 All Rights Reserved By Star Digits.

    Type above and press Enter to search. Press Esc to cancel.