Subscribe
Tutorial search

C++ lesson about variables - C++ tutorial


What is a variable ? A variable is a facility to store data. We can store values in variables and we can change it`s value. In C++ we can use multiple variable types, but the following ones are the most used:
Category: C++ > Programming - Difficulty:


More cool C++ tutorials:



 Data Encryption In C#
Data Encryption In C#
Data is most vulnerable when transferred across a network or stored on a disk drive. An attacker with some knowledge and skills can bypass security software and gain access to sensitive data. However, you can use cryptography to your advantage. You can protect your private data by encrypting their information with a key code, only you will know.
Difficulty:
Using vector instead of arrays to prevent most of memory leaks
Using vector instead of arrays to prevent most of memory leaks
Most of beginners define arrays of limited size such as:

int array[100]; // array that can accomodate 100 integer values

These are ok, but your requirement may be different, and you want your application to determines the size of array at runtime, so if your requirement is to use 10 elements only, that means 90 are unused but memory is still allocated for them while application is running. On other hand your application requires 110 elements to be saved, the last 10 will be unallocated spaces if array size is 100, and access to unallocated memory address may result in applciation crash and/or system level damage.
Difficulty:
Clear screen in windows console using API
Clear screen in windows console using API
This is mosly useless, I'll admit it, but it's fun Perhaps you can learn something from it?
Difficulty:
The for loop - C++
The for loop - C++
The general format of the for loop is shown in the figure, expl is an assignment expression that is used for initializing a loop index.
Difficulty:
 Reference Data Types
Reference Data Types
Reference types provide excellent flexibility and performance of large structures. This is the reason that classes are reference types and structs are data value types. As you will probably know, reference types do not store the actual value of the object but a pointer to a memory location. This pointer is stored on the stack whereas the object itself is located in the managed heap.
Difficulty: