Lawrence Technological University
College of Arts and Science
Department of Mathematics and Computer Sciences
Introduction to C, MCS 1142
The following is a template that you can use as a starting place
for all your class programs. Copy the program below to the
Windows clipboard. Then
open Notepad and paste the program there. Personalize
your template by substituting your actual name and student id. Use
Ctrl-A or Edit | Select All to highlight the entire
template. Now Ctrl-C or Edit | Copy will put your
personalized template on the Clipboard.
Now using C++Builder 5, there are a few more steps:
- Start C++Builder 5.
- Use File | Close All to clear the screen.
- Close the "Object Inspector window".
- Use File | New... and then double click the "Console Wizard"
- In the Console Wizard window, check C for the source type,
check console application and uncheck use VCL and uncheck multi
- Click Ok to close the Wizard window and open your new application.
- Close the Classes window pane on the left of the Code Editor
- Select the Code Editor Window and use Ctrl-A to highlight all
the code in Unit1.c. Then use Ctrl-V to replace all the code there
with your personalized template.
- Use File | Save Project As to save your new template project. Save
Unit1.c as c:\mcs1142\mcs1142.c (or m:\mcs1142.c or a:\mcs1142.c
if you are using a computer in the S115 lab). And save Project1.bpr
as c:\mcs1142\mcs1142.bpr (or m:\mcs1142.bpr or a:\mcs1142.bpr if you
are using a computer in the S115 lab).
- Finally click the green "Run" arrow to test your template.
- Close C++ Builder 5.
purpose: a template for programs for mcs1142, Intro to C
author: Your Name
student id: YN000000000
/* your variables go here */
/* your program starts here */
/* your program ends here */
/* a patch to hold the output window open when using the
C++Builder5 IDE, NOT needed for the command line */
printf("\npress Enter to continue ..."); // tell the user what to do
fflush(stdin); // discard any left over keystrokes
getchar(); // hold the output window open until Enter is pressed
/* end of hold open patch */
Revised January 5, 2003