Welcome, Guest. Please login or register.
September 06, 2010, 10:41:28 PM
Home Help Search Login Register
News: eduLanka online education web site  | HuhHuh HuhHuh HuhHuh?

+  edulanka online Encyclopedia
|-+  IT Education
| |-+  Programing Forum
| | |-+  C and C++ programing Languages
| | | |-+  C basic and Introduction
« previous next »
Pages: [1] Print
Author Topic: C basic and Introduction  (Read 175 times)
sathiska
Administrator
Montisoory Baba
*****
Posts: 24


View Profile Email
« on: March 09, 2010, 06:16:23 AM »

This tutorial is for everyone; if you've never programmed before, or if you have extensive experience programming in other languages and want to expand into C++. It is for everyone who wants the feeling of accomplishment from a working program.

C++ is a programming language of many different dialects, just as each spoken language has many different dialects. In C++, dialects are not because the speakers live in the North or South; it is because there are several different compilers. There are several common compilers: Borland C++, Microsoft C++, GNU C++, etc.. There are also many front-end environments for the different compilers, the most common is Dev-C++ around GNU's G++ compiler. Some are free, others are not. Please see the compiler listing on this site for information on how to get one and set it up.

Each of these compilers is slightly different. Each one should support the ANSI/ISO standard C++ functions, but each compiler will also have nonstandard functions (these functions are similar to slang spoken in different parts of a country. Sometimes the use of nonstandard functions will cause problems when you attempt to compile source code (the actual C++ written by a programmer and saved as a text file) with a different compiler. These tutorials use ANSI/ISO standard C++ and should not suffer from this problem with sufficiently modern compilers.

If you don't have a compiler, I strongly suggest that you get a compiler. A simple compiler is sufficient for out use, but you should get one in order to get the most from these tutorials.

C++ is a different breed of programming language. A C++ program begins with a function, a collection of commands that do something. The function that begins a C++ program is called main. From main, we can also call other functions whether they be written by us or by others. To access a standard function that comes with the compiler, you include a header with the #include directive. What this does is take everything in the header and paste it into your program. Let's look at a working program:
 
Code:
#include <iostream>

using namespace std;

int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();
}
« Last Edit: May 11, 2010, 06:24:58 AM by guruthuma » Logged
sathiska
Administrator
Montisoory Baba
*****
Posts: 24


View Profile Email
« Reply #1 on: March 09, 2010, 06:24:36 AM »

Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!