Tutorial search
C++ Tutorials
Tutorials
Stuff
Affiliates
Photoshop Templates
Featured Photoshop templates - professional ready to use designs for your next project.
View all templates
C++ Basics Tutorials
We hope that you will enjoy our C++ Basics tutorials. Feel free to contact us if you would like to be a tutorial hero and contribute your own C++ Basics tutorials to our site. Thank you !
C++ Basics - Great tutorial for beginners on using C++

Sometimes is necessary to hold more than one object in your program as an object, a part, of a bigger collection. For example, one might want to store information about each book in his possession. So, a collection which represents these books must be defined. The C# language and the .Net environment offer you numerous techniques for implementing these kinds of collections in your code. One of those techniques is by using a collection structure.

The switch statement offers the programmer the capability to choose a specific block of code from a set of mutually exclusive ones. It is similar but not identical to the if statement. The block of code that will be chosen is not known before the execution of the program. This can be for example due to different windows platform or specific localization settings of each country.

C# provides several mechanisms for flow control in a program. The loops in C# allow you to execute a block of code repeatedly, until a certain condition is met. This condition can be the number of repetition, a variable taking a specified value or something completely different. The while loop is a pre-test loop and is used to execute a block of code for a number of times not known before the loop begins. The do..while loop is a post-test loop and is used for the same purposes as the while loop.

The string class is designed specifically for storing and manipulating strings. Some operations of this class include conversion to lower or uppercase, removal of leading and trailing whitespace, replacing characters, comparing two strings and more. Also, a ToString() method is inherited to every object in C#, making available a string conversion of any object. Of course, this method can be overridden in your classes so that you can define the process in which this conversion takes place.

C# distinguishes between two (2) different data types categories: value and reference types. Value data types directly store their value while reference data types store a reference to their value. Value types are stored on the stack whereas reference types are stored on the managed heap.

Structs, similar to classes, are used to define various objects in your code. They are stored on the stack, rather than in the managed heap. This means that they are value-type objects and thus, when you pass a struct as a parameter in a function, a copy of the object is actually passed to that function. This can affect the performance of your code if you use structs for large objects. However, since the .Net does not bring in the managed heap, structs are more suitable for small objects of limited functionality and with no inheritance capabilities.

The if statement is a so-called conditional statement. It allows you to branch your code depending on whether certain conditions are met or not. C# has two such conditional statements, the if statement and the switch statement. In this tutorial we will talk about the if statement, a frequent element of all programs.

A significant advantage of C# when compared to C++ is the memory management capabilities of the C#. The programmer need not worry about memory management; the garbage collector is assigned this operation on the programmer’s behalf. You will probably know that value data types are stored on the stack while reference data types are stored on the managed heap. The stack stores data value types that are not members of objects. Also, in C# it is always the case that if variable a goes into scope before variable b, then b will go out of scope first. For example, if you declare some variables in a method, these variables will go out of scope when the method ends. However, it maybe sometimes that you need to keep these variables long after the method/function ended. This happens for all data declared with the new operator, the reference types. All reference types are stored in the managed heap, which is under the control of garbage collector.

Functions are a must for modern object oriented programming and for visual programs as well. When you click a button on your mouse an event is generated. This event fires a function that is linked to that particular event. Therefore, you need to define several functions that correspond to various actions your code should perform. They are also useful when you need to call a block of code many times in different parts of your program.

C# provides several mechanisms for flow control in a program. The loops in C# allow you to execute a block of code repeatedly, until a certain condition is met. This condition can be the number of repetition, a variable taking a specified value or something completely different. The for loop allows you to repeatedly execute a block of code for a specified number of times.

Structured Programming - How it is important in field of Software Development

C Beginner Examples Tutorial - Getting started with C programming

C++ Beginners Guide - Learn the basics of the C++ Programming language

Classes provide templates that describe various objects, from a customer of a hotel to a new car model. In this tutorial we will talk about some basic concepts regarding their declaration methods and usage.
Total Tutorials in Category: 101





