Introduction Demo1 (1)

Post on 23-Dec-2015

217 views 1 download

description

Introduction to CNG labs

transcript

Brief Information on

CNG230 Labs

Spring 2013

Week 1

Content• Lab Requirements

– Weekly Program– Lab Task

• METU-Online (for recent announcements, course materials)

• Environment/Compiler to be used– Dev-C++ Compiler– How to obtain?– How to compile and run?

Lab Requirements

• Students who do not attend 3 or more labs will fail from the course!!!

• A lab test will be given and is to be solved during lab hours. Lab grade will mainly depend on it.

• The lab task will be a programming exercise which you

will do during the lab hours on your own. It will be an INDIVIDUAL task so you cannot cooperate!

METU-Online

METU-Online web site: http://online.metu.edu.tr

Creating a new source file:

Area where code is written

Compiling the source file (3 ways):

1) File menu > Execute, 2) Icon on toolbar 3) Shortcut keys (CTRL+F9)

No error in the code, so we can run the executable file

Running the executable file (3 ways):

1) File menu > Execute, 2) Icon on toolbar 3) Shortcut keys (CTRL+F10)

After running the executable file, you see the output:

After compiling, you may encounter compile errors which you must eliminate in order to have an executable file

You see an example below. Dev-C++ shows you where the errors are. You should understand cause(s) of the errors and fix them. After getting a hands-on experience with your compiler, you will be able to obtain error-free codes.