New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Create vc++6
1. How to Create a C Program with Visual C++ 6.0
After launching the VC++ 6.0 application, you arrive at the main IDE screen:
1) From the File menu, choose New.
This will bring up the New dialog window:
2) Under the Projects tab, highlight Win32 Console Application.
2. 3) Fill in the Project name and Location where you want the project stored. (Note: This will be the name of the
Project, not the C file):
4) Press OK
This brings up the Win32 Console Application Step 1 of 1 Window:
5) Choose An empty project and click the Finish button.
This brings up the New Project information window:
3. 6) Click OK on the new Project information window:
4. You will now be in the IDE with your project open:
7) Since we are writing C and not C++, it is best to click the File View tab at the bottom left.
The view will change to:
5. You can now see all of the files associated with your project at the left…
But since you just created the project, there are no files yet.
8) To add a file to your project… Choose New from the File menu.
The New dialog box appears:
9) Select C++ Source file on the left side of the screen (NOTE: We use C++ source file even though we will be creating a
C source file).
10) Under File name:, type the name of your new source file. (IMPORTANT: Make sure that your source file has the
extension .c and NOT .cpp)
11) Click OK.
6. Your new source file will now be open on the screen, ready for editing:
Also note that your file now appears under the Source Files folder at the left.
7. 12) Type your source code in the editing window:
13) When you are ready to compile, choose Compile from the Build Menu (or use CTRL-F7).
Errors an warnings will be listed at the bottom of your screen.
14) Eliminate all errors and compile again.
When your program has successfully compiled, you are ready to build it (make an executable).
15) Choose Build from the Build menu.
16) After the build is successful, you may run your program by choosing Execute from the Build menu.
If all goes well, your program should launch in a DOS window:
8. When you are all finished, choose Close Workspace from the File menu.