C/C++

Good C++ Books

by Shabbir on July 17, 2009

in C/C++

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 [...]

{ 1 comment }

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 [...]

{ 1 comment }

Safe Programming

by Shabbir on August 22, 2008

in C/C++

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 better [...]

{ 5 comments }

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. [...]

{ 4 comments }

Structures in C/C++

by Shabbir on August 11, 2008

in C/C++

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 declare the [...]

{ 2 comments }

Functions in C++

by Shabbir on July 14, 2008

in C/C++

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 [...]

{ 0 comments }

Read From File In C++

by Shabbir on June 7, 2008

in C/C++

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];  while(in.getline(line, 256)) cout << [...]

{ 1 comment }

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 [...]

{ 0 comments }

Pointers and Arrays

by Shabbir on May 6, 2008

in C/C++

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 using [...]

{ 0 comments }

Pointers

by Shabbir on May 3, 2008

in C/C++

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 [...]

{ 0 comments }

Write To File In C++

by Shabbir on April 30, 2008

in C/C++

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 << "Some [...]

{ 2 comments }

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 by 1. [...]

{ 0 comments }

    About the Author

  • author photo

    My Name is Shabbir Bhimani and I am developer by profession in the field of applications, web and database. Currently doing full time online marketing and like to share my experiences on how you can make money online @ CodeItWell.com. Read more ...


    See how you can get in touch with me.