C++ Lab Exercises 1 (no submissions necessary)
- Launch DevCPP, create a source file called hello.cpp
and type in or cut and paste the following
text .
Save the file in a folder you can access and then,
compile and execute. It will be useful to execute the
program via the command line (CMD); type "hello.exe"
but you have to "cd" to the folder. This
vbscript allows you to run CMD on a folder.
- Functions and classes in CPP.
Create, compile and execute the program in this
text file .
Name this program BankApp.cpp.
- Separate compilation.
Functions, classes, and the code that uses those functions
and classes can be placed in separate source files.
Here you will need to create a CPP project.
Add to the project these three source files:
Build the project, and then execute
- Modules.
The more proper way to separately compile code
is with header files. This eliminates some
redundancies in written code.
Create and build a project with the following files: