C++ Tutorials

Operators in C++ 0

Operators in C++

Program 1 #include<iostream> using namespace std; int main() { system(“cls”); //cout<<(5<<3); //40 // cout<<(23>>2); cout<<(-1>>10); // cout<<((5&5|5)^5); // cout<< (5 & 5); //5 // cout<<endl<<(5 | 5); //5 // cout<<endl<<(5 ^ 5); //0 //...

C++ Project – Parking Lot Management System 0

C++ Project – Parking Lot Management System

Program 1 //Parking Lot Management System #include <iostream> using namespace std; class ParkingLot { private: int twoWheelerCount; int fourWheelerCount; const int maxTwoWheelers; const int maxFourWheelers; public: // Constructor to initialize ParkingLot(int max2W, int max4W)...

C++ Exception Handling 0

C++ Exception Handling

Program 1 #include <iostream> using namespace std; int main() { system(“cls”); int a,b,c; cout<<“Enter two number for division: “<<endl; cin>>a>>b; try { if(b==0) throw(“can not divide by zero…..”); c=a/b; cout<<“Ans of (a/b) is :...

How to Open and Close a File in C++ 0

How to Open and Close a File in C++

Program 1 // open file using Open Method for read #include <iostream> #include <fstream> #include <string> using namespace std; int main() { fstream fout; system(“cls”); fout.open(“H://dataflair//studentname.txt”,ios::app); //open a file in write mode) fout<<“Vishal Verma”;...