C++ Tutorial 1. Introduction 1.1. Why do people - TopicsExpress



          

C++ Tutorial 1. Introduction 1.1. Why do people program? 1.2. What is C++ & OOP? 1.3. What do I need to program? 2. Your first program 2.1. Running a C++ program 2.2. C++ program structure 2.3. Comments 2.4. Libraries 2.5. Functions 2.6. Streams 2.7. Return 3. Number Systems 3.1. Decimals 3.2. Binaries 3.3. Hexadecimals 4. Exercises 4.1. EX 1 : Running 4.2. EX 2 : Typing 4.3. EX 3 : Converting 5. What now? 5.1. Good programming sites 5.2. Good books on C++ 1.INTRODUCTION 1.1. Why do People Program? Each person can have his own reason for programming but I can tell you that programming is one of the best ways to gain a deep understanding of computers and computer technology. Learning to program makes you understand why computers and computer programs work the way they do. This Guide Is Provided By Cyber Elite.It also puts some sense into you about how hard it is to create software. 1.2. What is C++ & OOP? C++ is an extended version C. C was developed at Bell Labs, in 1978. The purpose was to create a simple language (simpler than assembly & machine code...) which can be used on a variety of platforms. Later in the early 1980s C was extended to C++ to create an object-oriented language. O(bject) O(riented) P(rogramming) is a style of programming in which programs are made using Classes. A class id code in a file separate from the main program - more on classes later. OOP in general & C++ in particular made it possible to handle the complexity of graphical environments. (like windows, macintosh..) 1.3. What do I need to program? Well, you need a computer and a compiler to start with but you also need some curiosity and a lot of time. I guess(!?) you have a computer. You can find different compilers for free from borlands website (Check 5.1). If you have the curiosity but lack in time read stuff at lessons and detention hours. Read whenever you find time. Having a good C++ book (check 5.2) also helps a lot. (and is much better for your eyes) One thing not to forget: No tutorial, book, program or course makes you a programmer in 5 days. YOU make yourself a programmer. NO compiler writes an entire program for you, YOU write the program. 2. YOUR FIRST PROGRAM 2.1. Running a C++ Program Read this part carefully: A C++ program must be compiled and linked before it can be executed, or run, on the computer. A great lot of compilers do this automatically. So what is a compiler? A compiler is a program that translates C++ code into machine language. Machine language is the language consisting of 1s and 0s, and is the native language of a computer.This Guide Is Provided By Cyber Elite.A typed C++ program is called the source-code, and the compiled code is called the object code. Before the object code can be executed, it must be linked to other pieces of code (e.g. included libraries) used by the program. The compiled & linked program is called an executable file. Finally, the program is executed by the system. Its output is displayed in a window. 2.2. C++ Program Structure All C++ progs contain statements (commands) that tell the computer what to do. Here is an example of a simple C++ program: /* Downloaded from code.box.sk We own you program */ # include int main() { cout
Posted on: Sat, 23 Nov 2013 11:50:15 +0000

© 2015