usingMaths.com
Demonstrating and showing pupils and students one application of Mathematics.







<< PreviousNext >>

Getting Started with C++



Development IDE

On Windows, Visual Studio now has a free version.
Go ahead and get it, and install the C/C++ platform tools.



Using Visual Studio

To create a new project: On the Start Page of Visual Studio, click New Project.
Select Visual C++ under the Template header and Win32 Console Application (for our purpose) under the .Net Framework header.
Give the project a name. >> OK >> Next >> Finish.

To create a new class file: click Project, Add Class.
Select C++ Class, Add;
Give the class a name and click Finish.



Running C++ Codes

To make sure your code contains no errors and see its output before you get to building it, set a breakpoint at the return statement in the main class:

Click on the left area of the "return 0" line to highlight it;
click Debug at the top of the window, Toggle breakpoint; a red dot appears on the return 0 line.

Press F5, (click Yes) to see the project run to completion - assuming there are no errors.
A new shell is created that shows the result of your code.

Alternatively, click Debug >> Start Without Debugging (Ctrl F5) to see your output.




Notice: Our colour coding follows that of Microsoft's Visual Studio.









<< PreviousNext >>