introduction demo1 (1)

13
Brief Information on CNG230 Labs Spring 2013 Week 1

Upload: bazil-nawaz

Post on 23-Dec-2015

217 views

Category:

Documents


1 download

DESCRIPTION

Introduction to CNG labs

TRANSCRIPT

Page 1: Introduction Demo1 (1)

Brief Information on

CNG230 Labs

Spring 2013

Week 1

Page 2: Introduction Demo1 (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?

Page 3: Introduction Demo1 (1)

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!

Page 4: Introduction Demo1 (1)

METU-Online

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

Page 5: Introduction Demo1 (1)
Page 7: Introduction Demo1 (1)

Creating a new source file:

Page 8: Introduction Demo1 (1)

Area where code is written

Page 9: Introduction Demo1 (1)

Compiling the source file (3 ways):

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

Page 10: Introduction Demo1 (1)

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

Page 11: Introduction Demo1 (1)

Running the executable file (3 ways):

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

Page 12: Introduction Demo1 (1)

After running the executable file, you see the output:

Page 13: Introduction Demo1 (1)

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.