259201 Computer Programming for Engineers Introduction to Programming in C Language on Visual C++ 2005 Platform 259201 Intro. Comp. Prog. C-Language1.

Slides:



Advertisements
Similar presentations
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Advertisements

XP New Perspectives on Microsoft Excel 2003, Second Edition- Tutorial 8 1 Microsoft Office Excel 2003 Tutorial 8 – Developing an Excel Application.
1 CSCI N305 C Language Programming Welcome to CSCI N305! Compiling Your First Program Using Microsoft Visual Studio 2008.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Microsoft Excel 2003 Illustrated Complete with Excel Programming.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Creating a Console Application with Visual Studio
Tutorial on Visual Studio express Introduction Visual Studio Express Editions are a new line of Microsoft development Tools. This line of products.
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
IT 211 Project Integration and Deployment Lab #11.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
Intro to MFC. Open VS and create new project 1)Open MS Visual Studio 2008 Professional (It must be the Professional Edition, the Express Edition will.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
A1 Visual C++.NET Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Quick Introduction The following.
Creating a Project with C++ Builder
1 Chapter 1 Introduction to Java. 2 History of Java Java Originally for _________________________ devices Then used for creating Web pages with __________________________.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Program Design and Coding
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
Lecture 6: Computer Languages. Programming Environments (IDE) COS120 Software Development Using C++ AUBG, COS dept.
Computer Science I How to Configure Visual Studio.NET 2003 for C++ Colin Goble.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Chapter 3 The Visual Basic Editor. Important Features of the VBE Alt-F11 will open the Visual Basic Editor. The Code window is to the right, Project Explorer.
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
LAB#1 CSC st semster H King Saud University College of Applied studies and Community Service Csc 1101.
All sections to appear here Welcome to my pptPlex Slide Show, this can be executed in either two ways: 1.As a normal PowerPoint slide show: Example hit.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Web Development in Microsoft Visual Studio 2013 / 2015.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Intro Compiler Configuration and Sample Project Walkthrough (For Axiom CME11E9-EVB)
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
DEVRY CIS 170 C I L AB 1 OF 7 G ETTING S TARTED Check this A+ tutorial guideline at
Dive Into® Visual Basic 2010 Express
© 2016, Mike Murach & Associates, Inc.
OpenGL project setup.
Web Development in Microsoft Visual Studio 2013
5.01 Understand Different Types of Programming Errors
Lab 1 Introduction to C++.
© 2016, Mike Murach & Associates, Inc.
Social Media And Global Computing Introduction to Visual Studio
Today’s lesson – Python next steps
CIS16 Application Development Programming with Visual Basic
1. Open Visual Studio 2008.
Introduction to Programming in C
Govt. Polytechnic,Dhangar
Digital Image Processing
Lab 1 Introduction to C++.
Creating Your First C Program Using Visual Studio 2010
Here is how you find MS Visual C on the Engineering
Creating Your First C Program Using Visual Studio 2010
Double click Microsoft Visual Studio 2010 on the Computer Desktop
Presentation transcript:

Computer Programming for Engineers Introduction to Programming in C Language on Visual C Platform Intro. Comp. Prog. C-Language1

Getting Started on on Visual C The platform is Microsoft Visual C Express Edition Go to All Programs  Visual C Express Edition  Microsoft Visual C Express Edition Make sure the Start Page “Show empty environment” and this is how to do it Intro. Comp. Prog. C-Language2

3 Open Visual C Start Page

Start Page “Show empty environment” Go to Tools—Options—Start Up And select Show empty environment as shown in the Fig. below Intro. Comp. Prog. C-Language4 Select File—Exit. And reopen the Visual Studio C

Intro. Comp. Prog. C-Language5 Set your environment

Fig. Main window Visual C++ without Start Page Intro. Comp. Prog. C-Language6

Write your first (second,…) program Intro. Comp. Prog. C-Language7

First Program on Visual C++ Express 1. Select File  New  Project. A window will pop up as shown in the Fig Intro. Comp. Prog. C-Language8 Fig. New Project

2. Go to Project types -> General. 3. Select Empty Project. Type entaneer_cmu for the Project Name 4. Do not change the Location: and Solution Name at this point Intro. Comp. Prog. C-Language9 Fig. New Project

Fig. New Project window Intro. Comp. Prog. C-Language10

3. Go to Project Tab and Select Add New Item 4. Under Code: Create a new file called test.c Intro. Comp. Prog. C-Language11

Fig. Editor window for entering your code Intro. Comp. Prog. C-Language12

5. Enter the following codes in the editor window #include void main() { printf(" Computer Programming for Engineers!\n"); } Intro. Comp. Prog. C-Language13

Fig. Editor window showing your first program Intro. Comp. Prog. C-Language14

6. Save the file (under the name test.C) 7. Under Build, select Build Solution (Or press F7) to create an output file 8. If successful, the following message will appear in the output box Intro. Comp. Prog. C-Language15 ======== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Fig. Result on Building the solution in the output Tab Intro. Comp. Prog. C-Language16

Possible Errors : Example 1 You can make possible syntax errors in C programming. For example, type in stead of in the first line. Now Save and Build the solution (F7). A syntax error message should appear in the output dialog box Intro. Comp. Prog. C-Language17 #include void main() { printf(“ Computer Programming for Engineers!\n”); }

Fig. Syntax error in output tab for example Intro. Comp. Prog. C-Language18

More information on the errors Intro. Comp. Prog. C-Language19.\test.c(1) : fatal error C1083: Cannot open include file: 'studio.h': No such file or directory.\test.c(1) means the file “test.c”, and (1) means the error is found in Line-1 “Cannot open include file: 'studio.h': No such file or directory” means the library studio.h cannot be found. The correct library is stdio.h, which is needed for C-programming

Now Change printf to print without the “f” And re-build the solution Intro. Comp. Prog. C-Language20 #include void main() { print(“ Computer Programming for Engineers!\n”); } Possible Errors : Example 2

Fig. Syntax error in output tab for example Intro. Comp. Prog. C-Language21

Now correct your code, and build the solution Intro. Comp. Prog. C-Language22 Run your first program ======== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

8. Go to Debug, and run the program by selecting Start Without Debugging (or Ctrl-F5). The run results appear as shown in the Fig. below Intro. Comp. Prog. C-Language23 รูปที่ 13 command window showing the results

Intro. Comp. Prog. C-Language24 Run Result Press any key, and the command window box will disappear

10. After finishing with the project, you can leave the Visual C++ program. 11. To re-open the program. Go to File -> Open and select Project/Solution… and select Project1.sln, Intro. Comp. Prog. C-Language25

Open your solution Intro. Comp. Prog. C-Language26