You are on page 1of 1

1.

Placing Classes in Separate Files Go to file, then new, then class, then name it , then two tabs will be created with .h And .cpp extensions. Now copy first two lines #include <iostream> using namespace std; from main function and paste it under the #include statemet of .cpp extension statement. Now in the function of .cpp extension file , write series of statements that u desire to result Then make an object in main .cpp file and then run it, it will execute those statements , stated in function coloumn of .cpp extension file, as it was a constructor.

You might also like