I have used Google book search to find some of the best books in c++. Here are my collection. Nice book to start with your C++ learning and it should be one of the first book to start with. It covers all the basics about C++ in a very simple and easy way. Google book [...]
PHP has come a long way in the last few years and now its one of the most popular known web language but has any one of us thought why the Name of the language is PHP and nothing else Or what is the full form of PHP. If No read through the complete post [...]
Once doing Code Review I found a code snippet like this and so thought would share my experience here. CDialog *SomeDialog = new CMyDialog(<<Some Param>>); SomeDialog->SomeFunction(this); In the above code we always assume that SomeDialog is always allocated with the CMyDialog class pointer but that may not be the case always and so its always [...]
Many developers like me tend to write code in ANSI compilation till we managed to get our hands on Visual Studio 2005 where the default setting is Unicode compilation and so you may need to be using the _T() / TEXT like function and if you are aware of them your life could become hell. [...]
Structures are a group of data elements, and we can access them using the structures. The data elements can be from any types. Sample of a structure struct StructName { int i; char c; } obj1, obj2; So, a structure is declared with the “struct” keyword, then comes its name. Then, in the braces we [...]
Functions are pieces of code, that can be executed by calling from another function. You know that a common C++ application, must have one function, that functions is int main(). So there is a statement of a function return_type function_name(parameter1, parameter2,…) { // Statements } return_type, is the type that the function returns as a [...]
In the previous tutorial we explained how to do that in C#, now we will do that in C++. So, create a Win32 C++ Console Application. This tutorial will be similar to the tutorial for writing to file in c++, So, write this code int main() { ifstream in; in.open("text.txt"); char line[256]; [...]
Trigraph is a sequence of three characters. The first two always are question marks “??”. Trigraphs are equivalent to some single characters. Here is a table from trigraphs and their equivalents Trigraph Equivalent ??! | ??< { ??> } ??/ \ ??’ ^ ??- ~ ??= # ??( [ ??) ] This can cause some [...]
In this article we will explain moving the pointer through an array. It’s simple but sometimes confusing. So try these simple examples in your unmanaged C++ project. Creating an array and assigning a pointer to it int arr[4]; int *ptr = arr; //[*][ ][ ][ ] Points at the first element of the array When [...]
Pointers are one of the hardest parts of programming to understand. But they are very useful. When programming with pointers, we use two operators: reference operator (&) and dereference operator (*). We use the reference operator to see the address where a variable is stored, and the dereference operator is to see the value of [...]
In this post we explained writing in a file using the C# language. In this post we will explain how to do that in unmanaged C++. So, we are creating a C++ console application, you can use Dev C++ for compiling this code. Here is the code. int main() { ofstream fw; fw.open("text.txt"); fw [...]
Very common programming practice is adding or subtracting an integer variable by 1. We know that adding 1 to variable is incrementing, and subtract 1 from variable is decrementing. It only works with integer values. Let us see some examples i++; i=i+1; i+=1; This three commands are all the same. It increments the variable i [...]