Console Application Using Visual C/C++
-
Upload
atsumagaysay -
Category
Education
-
view
425 -
download
11
Transcript of Console Application Using Visual C/C++
![Page 1: Console Application Using Visual C/C++](https://reader031.fdocuments.in/reader031/viewer/2022020110/55a3eba71a28abd7378b46dd/html5/thumbnails/1.jpg)
1
How to Write Program in Visual C++ By Ariel T. Sumagaysay, MSCS
1. Load Visual Studio 2008
2. Click – File – New Project
![Page 2: Console Application Using Visual C/C++](https://reader031.fdocuments.in/reader031/viewer/2022020110/55a3eba71a28abd7378b46dd/html5/thumbnails/2.jpg)
2
3. Select C++ - Win32 Console Application. Enter project name, and click OK button.
4. Click NEXT button
![Page 3: Console Application Using Visual C/C++](https://reader031.fdocuments.in/reader031/viewer/2022020110/55a3eba71a28abd7378b46dd/html5/thumbnails/3.jpg)
3
5. Click empty project option, then click FINISH button
6. Select Source Files folder found at the Solution Explorer of Visual Studio 2008 found at the right side of the IDE.
![Page 4: Console Application Using Visual C/C++](https://reader031.fdocuments.in/reader031/viewer/2022020110/55a3eba71a28abd7378b46dd/html5/thumbnails/4.jpg)
4
7. Right – Click Source file folder, select ADD – New Item.
8. Select C++ File (.cpp), enter Name and click ADD button.
![Page 5: Console Application Using Visual C/C++](https://reader031.fdocuments.in/reader031/viewer/2022020110/55a3eba71a28abd7378b46dd/html5/thumbnails/5.jpg)
5
9. Enter the following codes: #include “stdio.h” #include “conio.h”
#include <iostream> using namespace std;
int main() { int A,B,C; cout << "Using the CIN keyword\n\n"; cout << "Enter A Value: "; cin >> A; cout << "\n"; cout << "Enter B Value: "; cin >> B; cout << "\n"; C = A + B; cout << "The result of Adding A & B: " << C << endl; _getch(); return 0; }
10. Press F5 to build and run your program. (or click Build – Rebuild,or click Build – Clean, or click – Compile – F5).