<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://assela.pathirana.net/index.php?action=history&amp;feed=atom&amp;title=Template%3ACpptutorial_Introduction</id>
	<title>Template:Cpptutorial Introduction - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://assela.pathirana.net/index.php?action=history&amp;feed=atom&amp;title=Template%3ACpptutorial_Introduction"/>
	<link rel="alternate" type="text/html" href="https://assela.pathirana.net/index.php?title=Template:Cpptutorial_Introduction&amp;action=history"/>
	<updated>2026-05-13T13:41:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.0</generator>
	<entry>
		<id>https://assela.pathirana.net/index.php?title=Template:Cpptutorial_Introduction&amp;diff=3584&amp;oldid=prev</id>
		<title>Root: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://assela.pathirana.net/index.php?title=Template:Cpptutorial_Introduction&amp;diff=3584&amp;oldid=prev"/>
		<updated>2007-06-08T15:04:42Z</updated>

		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Introduction=&lt;br /&gt;
This tutorial is designed for you to learn the C/C++ language in a rapid-phased way, generally over a period of four days of intense work. Even though you will have some time with an instructor, you will have to do a lot of practice as homework in order to gain sufficient confidence as a programmer. Most of the material is ideal for self-study.  &lt;br /&gt;
&lt;br /&gt;
==Acknowledgment==&lt;br /&gt;
A number of sections of this tutorial were adopted with permission from [[Juan Soulie]]&amp;#039;s  excellent [http://www.cplusplus.com/doc/tutorial/ C++ Language Tutorial] published in &amp;lt;tt&amp;gt;cplusplus.com&amp;lt;/tt&amp;gt;. In many of the lessons, changes from original tutorial are minor. However, there are some important differences in a few sections. Therefore, you are advised to follow the present tutorial during the course. On the other hand,  remember that [[Juan Soulie]]&amp;#039;s site will hopefully be updated more frequently, therefore for general look-up for help, that site will be better.&lt;br /&gt;
&lt;br /&gt;
My colleague [[Billah]] helped to convert the original tutorial to this format. Thanks, [[Billah]].&lt;br /&gt;
&lt;br /&gt;
==How to use this material effectively==&lt;br /&gt;
{{box|It is important to keep in mind that C++ and {{vcc}} are not the same thing. C++ is the language. {{vcc}} is the compiler used to build a program with that language. There are many other alternatives to {{vcc}} as compilers. These can do the task of compiling a C++ program equally well.}}&lt;br /&gt;
Let&amp;#039;s face it, our mission here is not to become professional programmers. The objective is rather to become familiar with programming as a tool. Think of programming as a challenge similar to learn cycling. You need some instructions and perhaps a bit of &amp;#039;pep-talk&amp;#039;, but what is mostly needed is to go out there and do it! And then practice a lot. It may be not possible for everybody to become a racing cyclist, but anyone can learn how to ride a bike for leisure or commuting. In my decade-long experience in teaching programming as a useful tool, I never came across someone who could not master it with adequate practice. &lt;br /&gt;
&lt;br /&gt;
I will help you to set up a environment where you can write and test programs. There are many good compilers out there for C++ and some of the best ones are free and open source. However, the platform we use to try-out these examples is [[{{vcc}}]] which is a free version of a commercial software. Please keep in mind that there are many other ways of doing the same thing. &lt;br /&gt;
&lt;br /&gt;
If you want to install and configure [[{{vcc}}]] yourself, please follow the instructions given in [[{{vcc}}|this page]].&lt;br /&gt;
&lt;br /&gt;
==Some platform related stuff==&lt;br /&gt;
&lt;br /&gt;
[[{{vcc}}]] manages its files organized into &amp;#039;Projects&amp;#039; and &amp;#039;Solutions&amp;#039;. A &amp;#039;Solution&amp;#039; can have several &amp;#039;Projects&amp;#039; under it. This creates a multitude of files, that has nothing to do with C++, but just to help [[{{vcc}}]] to do the housekeeping. In the beginning, this can lead to confusion. &lt;br /&gt;
&lt;br /&gt;
I have prepared a template project that you can download and extract in your working computer. Using this project will make your life much easier. Download it from [[Media:vcppee2005_template2.zip|here]] and unzip it in an empty directory. Then clicking on file &amp;lt;tt&amp;gt;cbcpp.sln&amp;lt;/tt&amp;gt; should open the solution and project in [[{{vcc}}]]. The file structure will be something like the following: &lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
├───myprograms&lt;br /&gt;
│   ├───lesson1&lt;br /&gt;
│   ├───lesson2&lt;br /&gt;
│   └───lesson3&lt;br /&gt;
└───vsee2005stuff&lt;br /&gt;
    │   cbcpp.ncb&lt;br /&gt;
    │   cbcpp.sln&lt;br /&gt;
    │   cbcpp.vcproj&lt;br /&gt;
    │&lt;br /&gt;
    └───Debug&lt;br /&gt;
            BuildLog.htm&lt;br /&gt;
            cbcpp.ilk&lt;br /&gt;
            cbcpp.pdb&lt;br /&gt;
            mt.dep&lt;br /&gt;
            ptr2.obj&lt;br /&gt;
            vc80.idb&lt;br /&gt;
            vc80.pdb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the files in the folder &amp;lt;tt&amp;gt;vsee2005stuff&amp;lt;/tt&amp;gt; and its sub-folders are not important for our learning tasks. Following figure shows the [[{{vcc}}]] environment with this project (and solution) open. &lt;br /&gt;
&lt;br /&gt;
[[Image:vcppee2005.ep.jpg]]&lt;br /&gt;
&lt;br /&gt;
In order to compile and run a program, you should write it in this environment (We will come to that in the next chapter.) This can be done by right-clicking on &amp;lt;tt&amp;gt;source files&amp;lt;/tt&amp;gt;, then &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;New Item&amp;lt;/tt&amp;gt;. You will get a dialog like the following. &lt;br /&gt;
&lt;br /&gt;
[[Image:vcppee2005.ep2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remember two things here: &lt;br /&gt;
* Save your source code as &amp;lt;tt&amp;gt;*.cc&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;*.cpp&amp;lt;/tt&amp;gt; (e.g. &amp;lt;tt&amp;gt;hello.cc&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;hello.cpp&amp;lt;/tt&amp;gt;) (&amp;lt;tt&amp;gt;Name&amp;lt;/tt&amp;gt; box)&lt;br /&gt;
* In the &amp;lt;tt&amp;gt;Location&amp;lt;/tt&amp;gt; box navigate to a sub-folder in &amp;lt;tt&amp;gt;myprograms&amp;lt;/tt&amp;gt; (e.g. &amp;lt;tt&amp;gt;myprograms\lesson1&amp;lt;/tt&amp;gt;. This will keep your code neatly sepearted from [[{{vcc}}]] related stuff.&lt;/div&gt;</summary>
		<author><name>Root</name></author>
	</entry>
</feed>