Tuesday, 6 November 2012

Starting with C++

Installing C++(in Win XP/Vista/7 x32/x64)

I have been using Turbo C++ 3.0 since 2 years and i advice to use this version,as per my experience.It is user friendly.You can download it from here for XP/Vista/7 32-bit.Just extract the zip file in directory "C:\TC\",and run the Install.exe file,and after following some simple steps you will be able to run the program.


But,for running it in x64,you may have to follow some steps-

  1.  First of all install DOSBOX ver 0.74(download from here if you dont have).
  2. Create a folder "C:\TurboC\"(you can use any name other than 'TurboC')
  3. Download(from here if you dont have) and extract TC in the TurboC folder
  4. Run DosBox and type the following commandsin the Command Prompt[Z]
  • mount d c:\Turbo\ [The folder TC is present inside the folder Turbo](you should get the following message saying:"Drive D is mounted as a local directory c:\Turbo\"
  • d: (to shift to D: drive)
  • cd TC
  • cd bin
  • tc or tc.exe(this starts the Turbo C++ 3.0)



After successfully installing the program you may have to do several changes.Goto Options>Directories and type your relevant folder address in the Output directory.Then goto Options>Linker>libraries.. and select the Graphics directory.Then to check whether the compiler is ready to compile without any undesired errors,type the following code-

void main()(the language is case sensitive)

{

}

and then press Alt+F9.If the compilation is done without any errors or warnings,the complier is ready.

Some C++ concepts


C++ can understand following set of characters,combiningly known as character set.

 Letters     -     A-Z , a-z

Digits        -     0-9

Special Symbols     -     Space  + - * / \ ^ { } ( ) [ ] = < > . ' " $ , ; : % ! & ? _(underscore) # <= >= @

White spaces     -     Blank spaces,horizontal tab,carriage return,newline,Form feed

Other characters     -     C++ can process any of the 256 characters as data or as literals.


The language has some keywords(the words that convey some special meaning to the language).
Eg- int is a keyword which tells the language to define an integer variable.
These keywords are flagged in white color(by default).

No comments:

Post a Comment