310 likes | 453 Views
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:
E N D
LP104: Object-Oriented Programming C++ Integrated Development Environments (IDEs)
Outline • Demonstration on two IDEs • Microsoft Visual Studio 2003 / Visual Studio 6 • Dev-C++ • Writing YourFirst C++ Program
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
Microsoft Visual Studio • Includes Visual C++/C#/Basic…etc. • We will only use Visual C++ • Visual studio 2003 or Visual studio 6.0
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; }
Overview Click to open new Project or … View classes, source files here Manage projects, and edit source file Debug and build output …Click here
Adding a New Item – Method 2 Click to activate Solution Explorer
Hello World! [Ctrl-F5] Press any key to close console window
Common Errors (1) 3) Missing semicolon! 1) This dialog indicate errors in our code 2) Check here for error and line number
Common Errors (2) 2) Missing double quote! 1) Check here for error and line number
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)
Hello World! Press any key to close console window
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.
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.