Hello world program in C++ & VS2010 “D&A episode #1”

1 Comment

before going into code we need first to settle some important informations

C++ is originally called C with classes so it’s really a subset of C  , however C++ have a lot more Features than C ; including some basic things like inputs and outputs

do you mean that Scanf () and printf() and getche()  works in C++ ? yeah they do  =)  actually all C functions do work on C++

Great  so that means we don’t need to read about functions , arrays and all the C stuff ,,, yeah however we will elaborate some important things and offcourse things related to data structure

so let’s  code :

in the begining this is a let’s describe how to configure visual studio for a hello world program ,and a sample code to make a simple hello world program

the source code project  from here : Download

  • open new project  cntrl + shift + N
  • click new win 32 console application
  • click on console application  and empty project
  • then on the right click on the solution explorer
  • if you cant find the solution explorer click show it from View next to file in the menu  or click  cntrl +alt + L
  • and write the following in the  main file

  • #include <iostream>
    using namespace std ; 
    void main () { 
     cout << "hello world " ; 
  • click cntrl +f5 to run


  • #include <iostream>    // this to include the libraries for console output  .. has alot of similarities with stdio.h “standard input and output” library in C
  • using  .. this keyword in C++ is like we say assume that we are using , the following so we write using namespace std  , in order not to say  std::cout  and write cout  alone , (we will explain what’s the name space later on )
  • cout is like printf  it takes a string and prints it into the console

How to get a free Microsoft Visual studio 2010


microsoft visual studio 2010

Hello to my new  series of  lessons  “data structure and algorithms using C++ and Ms VisualStudio2010 “

before going through algorithms and Data Structure or even C++ we need First to install an IDE : “integrated development environment ”

is a software application that provides comprehensive facilities to
 computer programmers for software development    src : wikipedia 

the most of  IDEs  mainly consists of  :

  • text editor
  • compiler
  • debuggerr
  • design tools

the IDE main benefit is it’s integrates all the processes of writing code in one program which is the “IDE” as well as configuration to the files and writing a preparation code to let developers start developing at once

some examples of an IDE ,

in the early ages  people used  the command line tools

lately :

Microsoft visual studio  on windows platform  , Eclipse , Netbeans , ActiveState Komodo .

how to get a free microsoft visual studio :

for any user :

you can download visual studio 2010  express version it’s for free but it has  less feature than the other version but for a beginner developer , it doesn’t matter  : http://www.microsoft.com/express/Downloads/#2010-Visual-CPP

and here’s a little comparison about different visual studio version

for students  :

if you have a  live@edu email , -if you don’t have one contact your campus –  you can logi nto Microsoft Dream Spark then you could download a punch of developers stuff including microsoft visual C++ express which is already free as well as Microsoft visual studio 2010  professional edition which is not .

for students in computer science and computer engineering   :

contact your campus MSP –microsoft student partnersfor an MSDNAA account this MSDNAA account provides alot of Free Microsoft stuff only for students that helps them in their study like : windows 7 professional , Ms visual studio professional , expression studio version 3 & version 4  ….etc . if you already have one you could login through here : bit.ly/MSDNAA_account   (only for ASU , engineering Campus  )

….. to be contiued

Newer Entries