Introduction To Computing Lab # 2: C++ Tool Learning
Introduction To Computing Lab # 2: C++ Tool Learning
#include<iostream>
using namespace std;
int main()
{
cout<<"Welcome to ITC class";
return 0;
}
d) Open cmd and type in the command to move into ITC folder.
cd desktop
cd ITC
e) Tests the following Commands on the above cpp file:
1. g++ -c [yourfilename].cpp
2. g++ -o [yourfilename].exe [your filename].o
3. [yourfilename].exe
4. g++ -o [anyOthername].exe [your filename].o
5. [anyOthername].exe
6. Rename the above cpp file and execute the following command:
g++ -o [yourfilenewname].exe [yourfilenewname].cpp
7. [yourfilenewname].exe
8. Rename the above cpp file and execute the following command:
g++ [yourfilename].cpp -o [yourfilename].exe
9. [yourfilenewname].exe
10. Rename the above cpp file and execute the following command:
g++ [yourfilenewname].cpp
f) Run command to move back to the root directory on cmd.
g) Now run the above commands from 1 to 7 and if find issue then try to resolve.
Note: Download and Install MinGW on Your home PC using the following links below:
http://www.codebind.com/cprogramming/install-mingw-windows-10-gcc/
For windows 7:
https://www.ics.uci.edu/~pattis/common/handouts/mingweclipse/mingw.html