What is Function Overloading && How to Use it to Write Better Code
by Spyros Panagiotopoulos on 21/03/10 at 6:59 am
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
C++ is all about making C programmers lives easier. Function overloading is one more C++ feature that presented a nice technique for writing better and more managed code.
Full Story 4 Comments »How to Convert a CString to Integer and Vice Versa
Sometimes we have a CString that represents a number and we need to make an integer out of it or vice versa. To convert from CString to an Integer : Share and Enjoy:
Full Story 4 Comments »How to Code a Chat Client (Instant Messenger) in MFC Using Visual Studio
Since i started programming in MFC, there were 2 programming projects that i always wanted to take up. The first one was about creating an instant messenger and the second about coding an mp3 player. I’ve actually done both and i will also be presenting the mp3 player in a forthcoming tutorial. The mp3 player [...]
Full Story 2 Comments »Introduction to Arrays in C Programming
In this post, i ‘ll be making a short introduction to C arrays. Arrays are a pretty fundamental programming data structure that most novice programmers tend to be pretty comfortable with. Of course, this is quite understandable, since arrays are indeed a quite easy subject on their own. Share and Enjoy:
Full Story 4 Comments »How The XOR Operation Works and How to Use it In C to Create a Small Encryptor
Exclusive OR (xor) is probably one of the most used operations in today’s encryption schemes. If you’re into creating some kind of encryption in your programs, you would need to utilize XOR operations, as XOR is a pretty versatile “tool” that you should use. If you care to know, XOR is actually an exclusive OR [...]
Full Story 1 Comment »How to Write a Simple C++ Game in 15 Minutes
One of the things that have always fascinated me in programming is coding a game. I believe that many programmers take up C++ in order to create their first game. Although there are lots of different things that you need to be knowledgeable of to create a 2d or 3d game, you could actually be [...]
Full Story 2 Comments »Here Are The Top 5 C & C++ Programming Websites
Luckily, C and C++ programming are well documented and thoroughly explained online. By creating this website, thecprogrammer.com, i hope that some idea i will manage to make it a nice C/C++ online resource that will help people in their coding. Of course, there are already many established websites on that area already. Here is what [...]
Full Story 2 Comments »Socket Programming in C Under Linux
This is actually not a tutorial written by me, but i feel that in order to learn something you need to be looking at the best available online resources that are available out there. After all, there would be no point in writing about the same things over and over when some great tutorials already [...]
Full Story No Comments »How to Process Command Line Arguments in C
Parsing command line arguments in c is pretty easy and quite useful in many occasions. Here is a very simple example of how to parse the command line arguments and print them to screen. Share and Enjoy:
Full Story 1 Comment »What is a C Pointer and How to Pass by Value and Reference
Pointers is probably one of the most bugging programming elements that concern new programmers. In this post, i will try to explain what a pointer is, as descriptive as possible. Share and Enjoy:
Full Story No Comments »Popular Articles
Introduction to Arrays in C Programming
In this post, i ‘ll be making a short introduction to C arrays. Arrays are a pretty fundamental programming data structure that most novice programmers tend to be pretty comfortable with. Of course, this is quite understandable, since arrays are indeed a quite easy subject on their own. An array is actually a container of [...]
Full StoryHow to Convert a CString to Integer and Vice Versa
Sometimes we have a CString that represents a number and we need to make an integer out of it or vice versa. To convert from CString to an Integer : sscanf(c_hostPort,"%d",&i_hostPort); // CString To Int To convert an integer to a CString : CString ourstring ourString.Format("%d", ourIntegerValue); Share and Enjoy: If you enjoyed this post, [...]
Full StoryWhat is Function Overloading && How to Use it to Write Better Code
C++ is all about making C programmers lives easier. Function overloading is one more C++ feature that presented a nice technique for writing better and more managed code. What is Operator Overloading ? Imagine a function like “int sum(int x, int y)”. This one calculates the sum of two numbers. This works fine for 2 [...]
Full StoryWhat is Object Oriented Programming and Why You Need to Use It
Writing a small program every now and then is what most programmers do all the time. However, there are occasions when we need to create something bigger. Imagine that you wanted to create a small RPG game. When you are into this type of programming, you certainly undestand that this will take lots of hours [...]
Full StoryHow to Write a Simple C++ Game in 15 Minutes
One of the things that have always fascinated me in programming is coding a game. I believe that many programmers take up C++ in order to create their first game. Although there are lots of different things that you need to be knowledgeable of to create a 2d or 3d game, you could actually be [...]
Full StoryHere Are The Top 5 C & C++ Programming Websites
Luckily, C and C++ programming are well documented and thoroughly explained online. By creating this website, thecprogrammer.com, i hope that some idea i will manage to make it a nice C/C++ online resource that will help people in their coding. Of course, there are already many established websites on that area already. Here is what [...]
Full StoryHow to Code a Chat Client (Instant Messenger) in MFC Using Visual Studio
Since i started programming in MFC, there were 2 programming projects that i always wanted to take up. The first one was about creating an instant messenger and the second about coding an mp3 player. I’ve actually done both and i will also be presenting the mp3 player in a forthcoming tutorial. The mp3 player [...]
Full StoryHow to Code a Tic Tac Toe Game in C++ Including Artificial Intelligence Opponent
This post is going to be a bit longer than my usual posts. Some years ago, i wrote a small tic tac toe game in c++ (using visual studio as my IDE). I was mainly focusing on creating an artificial intelligent opponent for that game and wanted to actually create a minimax type algorithm. Therefore, [...]
Full StoryHow to Process Command Line Arguments in C
Parsing command line arguments in c is pretty easy and quite useful in many occasions. Here is a very simple example of how to parse the command line arguments and print them to screen. #include <stdio.h> main(int argc, char *argv[]) { int i; for(i = 0; i < argc; i++) printf("%s\n", argv[i]); return 0; } [...]
Full StoryHow The XOR Operation Works and How to Use it In C to Create a Small Encryptor
Exclusive OR (xor) is probably one of the most used operations in today’s encryption schemes. If you’re into creating some kind of encryption in your programs, you would need to utilize XOR operations, as XOR is a pretty versatile “tool” that you should use. If you care to know, XOR is actually an exclusive OR [...]
Full Story