1 / 31

LP104: Object-Oriented Programming

LP104: Object-Oriented Programming. C++ Integrated Development Environments (IDEs). Outline. Demonstration on two IDEs Microsoft Visual Studio 2003 / Visual Studio 6 Dev-C++ Writing Your First C++ Program. What is an IDE?. I ntegrated D evelopment E nvironment Usually includes:

aelwen
Download Presentation

LP104: Object-Oriented Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LP104: Object-Oriented Programming C++ Integrated Development Environments (IDEs)

  2. Outline • Demonstration on two IDEs • Microsoft Visual Studio 2003 / Visual Studio 6 • Dev-C++ • Writing YourFirst C++ Program

  3. What is an IDE? • Integrated Development Environment • Usually includes: • Editor – where you type in your code • Compiler – translates C++ code to executable format • Linker – combine several pieces of object codes and library codes • Debugger – helps you to locate program errors

  4. Microsoft Visual Studio • Includes Visual C++/C#/Basic…etc. • We will only use Visual C++ • Visual studio 2003 or Visual studio 6.0

  5. Your first program - Helloworld //This program do nothing except saying hello world #include <iostream> using namespace std; int main() { cout << "Hello, world!\n"; return 0; }

  6. Launching Visual Studio 2003

  7. Overview Click to open new Project or … View classes, source files here Manage projects, and edit source file Debug and build output …Click here

  8. Creating C/C++ Win32 Console project

  9. Application Settings

  10. Adding a New Item – Method 1

  11. Adding a New Item – Method 2 Click to activate Solution Explorer

  12. Add New C/C++ Source File Item

  13. Type in Program HelloWorld.cpp

  14. Start Compile/ Build/ Debug [F5]

  15. Start Without Debugging [Ctrl-F5]

  16. Compile/ Build Successful

  17. Hello World! [Ctrl-F5] Press any key to close console window

  18. Common Errors (1) 3) Missing semicolon! 1) This dialog indicate errors in our code 2) Check here for error and line number

  19. Common Errors (2) 2) Missing double quote! 1) Check here for error and line number

  20. Dev C++ • Dev C++ [Free] • http://www.bloodshed.net/devcpp.html • If you haven’t use it before, you’d better install the complete version. (i.e., Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2)

  21. Launching Dev C++

  22. Overview

  23. Creating C/C++ Console project

  24. Project Settings

  25. By default, a main file is created

  26. Type in Program helloworld.cpp

  27. Compile and Run

  28. Hello World! Press any key to close console window

  29. Microsoft VS.NET Express • Microsoft VS.NET Express [Free] • http://msdn2.microsoft.com/en-us/express/default.aspx • Before you submit your assignment, you’d better run it in VS.NET 2003/2005.

  30. ~End~

  31. Tasks • Follow the tutorial of lab 1 to write a simple program in your Visual Studio, compile and run it. • Solve the given programming task.

More Related