first steps of programming with cpp

23
1st step of programming with C++ - Kanha Sahu C++ Language

Upload: kanha-sahu

Post on 16-Jan-2017

173 views

Category:

Education


2 download

TRANSCRIPT

Page 1: First steps of programming with cpp

1st step of programming with C++- Kanha Sahu

C++ Language

Page 2: First steps of programming with cpp

Software• API Tools or Compiler

SRS• System Requirement Specifications

Install• Installation & Configuration

Experiments• Write a Program

References• Books, Tutorials and Other Links

C++

Page 3: First steps of programming with cpp

Compiler Author Windows Unix like Other OS License type

CCS C Compiler CCS, Inc. Yes Yes Yes Proprietary

Ch SoftIntegration, Inc YesMac OS-X,FreeBSD,Linux, Solaris

Yes Freeware

Clang LLVM Project Yes Yes Yes BSDCodeWarrior Metrowerks Yes Yes Classic Mac OS Proprietary

CParser/libFirm Matthias Braun, Christoph Mallon and Michael Beck Yes Yes Yes GPL

Digital Mars Digital Mars Yes No No ProprietaryDignus Systems/C Dignus, L.L.C Yes (host) Yes (host) Z/Architecture ProprietaryEdison Design Group Edison Design Group Yes Yes Yes Proprietary

GCC C GNU Project MinGW, Cygwin Yes IBM mainframe,

AmigaOS GPL

Portable C Compiler

Stephen C. Johnson, Anders Magnusson and others

Yes Yes Yes BSD

SubC Nils M Holm MinGWFreeBSD,NetBSD,

LinuxMS-DOS Public Domain

Tiny C Compiler Fabrice Bellard Yes Yes No LGPLWind River (Diab) Compiler Wind River Systems Yes Yes Yes Proprietary

https://en.wikipedia.org/wiki/List_of_compilers

Compilers

KASLAB
www.kaslab.in/
Page 4: First steps of programming with cpp

XPW7W8

Tubro CS R S

MinGWW10

Windows XPW7W8W10

Window

s

Page 5: First steps of programming with cpp

XPW7W8

Tubro CW10

Windows

C ++

Page 6: First steps of programming with cpp

About Turbo C Turbo C++ was a C++ compiler and integrated development

environment and computer language originally from Borland. Most recently it was distributed by Embarcadero Technologies, which acquired all of Borland's compiler tools with the purchase of its CodeGear division in 2008.

Turbo C++ 3.0 was released in 1991 (shipping on November 20), and came in amidst expectations of the coming release of Turbo C++ for Microsoft Windows. Initially released as an MS-DOS compiler, 3.0 supported C++ templates, Borland's inline assembler, and generation of MS-DOS mode executables for both 8086 real mode and 286 protected mode (as well as the Intel 80186.) 3.0 implemented AT&T C++ 2.1, the most recent at the time. The separate Turbo Assembler product was no longer included, but the inline-assembler could stand in as a reduced functionality version.

Turbo C++ v1.01 and Turbo C v2.01 can be downloaded, free of charge, from Borland's Antique Software website.

Turbo C 3.0 (DOS) was included in the Turbo C Suite 1.0, which is no longer sold by Borland.

Turbo CAbout• About Tool

Download• Download

Turbo C

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 7: First steps of programming with cpp

Download Turbo C https://turboc.codeplex.com/ http://sourceforge.net/projects/turbocforwindows-9/

Turbo CAbout• About Tool

Download• Download

Turbo C

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 8: First steps of programming with cpp

Installation & configurationAbout• About Tool

Download• Download

Turbo C

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Turbo C

Page 9: First steps of programming with cpp

Installation & configurationAbout• About Tool

Download• Download

Turbo C

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Turbo C

Page 10: First steps of programming with cpp

ExperimentAbout• About Tool

Download• Download

Turbo C

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Turbo C

Source Code - Input

Result - Output

Page 11: First steps of programming with cpp

MinGW

XPW7W8W10

Window

s

C++

Page 12: First steps of programming with cpp

About MinGW MinGW, a contraction of "Minimalist GNU for Windows", is a

minimalist development environment for native Microsoft Windows applications.

MinGW compilers provide access to the functionality of the Microsoft C runtime and some language-specific runtimes.

A port of the GNU Compiler Collection (GCC), including C, C++, ADA and Fortran compilers;

GNU Binutils for Windows (assembler, linker, archive manager)

A command-line installer, with optional GUI front-end, (mingw-get) for MinGW and MSYS deployment on MS-Windows

A GUI first-time setup tool (mingw-get-setup), to get you up and running with mingw-get.

MinGW About• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 13: First steps of programming with cpp

Download MinGW Click Here for Download: http://www.mingw.org/download/installer or http://sourceforge.net/projects/mingw/?source=typ_r

edirect After Download the setup, Please open mingw-get-

setup.exe

Note : Internet is required, because lib file will download from online by MinGW Installation Manager Setup Tool

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 14: First steps of programming with cpp

Installation - Please open mingw-get-setup.exe Press Install Button Default Directory is C:\MinGW if you want to install at

different location, Press Change Press Continue Wait for few minute and press continue Are you getting MinGW Installation Manager window ?? If yes, than follow the next step

As per your requirement you can select the package/options and download

Select Mingn32-gcc-g++, Mingn32-gcc-objc etc Go to menu bar > select Installation > Apply Changes Are you getting Popup ?? > Press Apply if you want to install Wait for minute and Installation will be completed.

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 15: First steps of programming with cpp

MinGW

Mingw installation manager

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 16: First steps of programming with cpp

Configuration Open the “bin” folder

<where you installed MinGW>\bin, By default C:\MinGW\bin

Copy that Url/Path : “C:\MinGW\bin” Right Click on My Computer > Properties You can see at Left-Side-bar > “Advance System

Setting”, Please Click there and goto Advance Tab At the Advance Tab > Click on “Environment

Variables” Environment Variables > In “System Variables”

Section scroll and select Path and Click on Edit Button You will get one popup.

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 17: First steps of programming with cpp

ConfigurationMinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 18: First steps of programming with cpp

ConfigurationMinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 19: First steps of programming with cpp

ConfigurationMinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 20: First steps of programming with cpp

Configuration Windows 10

You will get one popup, Click on New paste copied path of MinGW Like : C:\MinGW\bin”

Click on OK button and again click on OK button Windows 8 and Lower version of Windows

You will get one popup, First close the last path using semi-colon

Like : “%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\”

Enter Semi-colon -- ; and paste copied path of MinGW Like : “%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\

System32\Wbem; %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; C:\MinGW\bin”

Click on OK button and again click on OK button

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 21: First steps of programming with cpp

Configuration Restart your system Now you can write a program and test your path is

configured or not To update “mingw-get upgrade”

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Page 22: First steps of programming with cpp

Experiment By using notepad or any other text editor write a basic

program of C++ My File is in E:\cpp\test_cpp.cpp

MinGWAbout• About Tool

Download• Download

MinGW

Install• Installation &

Configuration

Experiments• Write a

Program

References• Books, Tutorials

and Other Links

Source Code - Input

Result - Output