Programming Language: How a Simple C++ Language Looks Like

On the first instance of learning about the C++ language, it is easy to conclude that this programming language is complicated. The simplicity of the C++ language has often been compared to the case of the chicken and the egg problem. Although it may look complicated and hard to understand the program on the onset, it is easy to learn how the programming language looks like and its working concept. This can be easily established with a look at the features that make the program and the basic elements of this type of programming language.

The Definition of C++ Programming Language
There are more than six programming languages that have been in use for years. The C++ language is a recent program, and like all the other programs it is used to help the user of a computer to instruct it accordingly. This program is not tied to any specific computer. This means that it can be used with any computer system no matter the location or the computer’s set up.

The C++ language was developed after the C high level language, which is used for low-level programming. The C++ language is based on this simple programming language and that is why the two share the same syntax subset and functionality. Additionally, all the capabilities found in the C language have been retained in the C++ program. The C++ language is the latest programming language to have been invented and it is stronger than all the other types of programming languages. The strength of the program can be seen in its scope, level of performance and the power it wields. It is these features that make the C++ language still unrivalled today and the most popular program that is used for a majority of the high performance applications and systems.

The Execution of the C++ Language
A single C++ program is made up of several source files. The source file is a disk that stores all the separate instructions and statements that are used to provide the action the computer it to carry out. These instructions and statements are simply referred to as source codes. The C++ program can be executed in two ways, as an interpreted language or compiled program.

Types of C++ Program Execution
As a compiled program, the C++ program must have the machine codes or instructions. This can only be done by converting the C++ language to the machine code. The program that is always used to make the conversion is called the compiler. There are three main functions that the compiler program plays:


  • It inspects the C++ language program
  • Analyzes the contents of the C++ language program
  • Generates the machine instructions to produce actions as specified by source codes

The second type of the programs execution is the interpreted language. This type of execution is not as direct as the compiled program execution. Inn this case it is a must that the intent of the source code is established before the program can be executed. This kind of execution is often slower. However, the good side about the execution program is that it does not require program compilation before it is run. This program is executed immediately the code has been entered. The kind of program execution that is best to use is often determined by the use intended for the language and the design of the programming language.

The Difference of C++ Language to Other Programs
There is never any one programming language that is better than the other. The power and performance of any language is what counts in most cases and this is determined by the context of the program. Other factors that may affect the kind of program that is used in the level of speed required, execution performance or how wide a range the execution is to take place. Different language programs come with different lengths and steepness of its learning curve. This means that although the C++ program is harder to learn than the other programs, each has its own difficulties. The reason why it takes much time to learn the C++ language program is due to the fact that it has a great deal more to it than what is to be expected with the other programs. This program is used with a wide range of applications.

Programming Language and C++ Language

Every day whenever you access the internet, you will discover new advancement that have been around or have just developed. You need to understand this programs and apply them on your day to day activities, for instance programming language is a data for writing programs and also involves calculations which are performed by machines, basically by a computer. Some of the important characteristics of programming language are; the functions and aims of the programming language, it controls the functioning of other devices in the computer such as printers, disk drives and others. This phenomenal also acts the same way as human beings think because, when an individual is using the machine he or she will give instructions or commands to the machine and it will respond automatically. Another trait of this programming language is that, it involves concepts or ideas for describing and controlling information when the machine is working.

About the C++ Language
C++ programming language was developed by Bjarne Stroupstrup to work as an advanced C programming language. It is object oriented and gives high level language. It is commonly used in programming languages and some of its features include; classes, virtual functions, templates and operator overloading among others.

Advantages of using C++ programming language
It is an advantageous programming language because it works on many codes without changing them, thus the C++ code can be used as many times as possible. The classes in the C++ programming languages make it essential because they can work on programmers avoiding any possible errors. And if a mistake occurs the C++ can rectify them and find the source of the problem. These features also make it efficient and does not waste a lot of time as it is works on a high speed. It also uses good language for writing in operating systems, disk drives and others. Thus it is an appropriate language to use when programming and thus why it is essential to engineers.

Languages used by the computer processor are the machine codes and are difficult for human beings to comprehend hence intermediary languages have evolved to solve the problem. A programming language has a few significances which make it more appropriate when functioning in our devices than the use of the machine codes and they are:-


  1. The programming language is easier to understand than the machine code and thus why may people have adapted to it after it was developed.
  2. This phenomenal is more useful than the machine codes because it is adjustable to any type of computer hence its flexibility makes it more essential in day to day use of computers.

Programming language can be divided into a few major categories and they are; interpreted, compiled, imperative languages and functional languages.

Imperative language program
This is the most employed type of programming language and involves the use of various essential commands or instructions, which are set into blocks to operate on the computer.

Functional program language
It is also referred to as procedural language and provides programs through the functions command hence when it is performing it functions it will receive an output and settles with an input.

Interpreted languages
The codes in the computer must be changed or converted so that the processor can understand and use them, hence the interpreter program should be made available to translate the commands correctly.

Compiled language
In this programming language category a compiler program is required to translate the assembled information. The advantage of this type of language is that it ensures the safety of the main code thus it cannot be copied or transferred to any other user.

How to learn programming language and C++ language
Many computer users are taking tutorial classes to learn more about programming language and the C++ language. There are many schools offering classes on is field and at early stages, a students is basically introduced to the practices and concepts involved in programming. And the more you pursue your education, the more your will learn new things on programming language and C++. Sometime you may not require going to school to learn about these programs, you can look for a qualified and experienced programmer and she will be helpful because most of the assignments and learning will be done practically. In case you enroll for online classes you should not forget to document the information you get.

CreateWindowEx() returns NULL, GetLastError() returns 0

As a windows programmer i often encore some development problems that me mad,
In problems I mean, an unknown error with no other information or return code nor GetLastError() function give me more information.

I am sure, that this means I am doing something wrong, somewhere on my code, the big question is where and of course what.

I try to use some of the techniques I know to get some more information on that error, and use the debugger to trace by step by step watching and digging into the application data to try and fetch more information that can help me figure it out where did I did my mistake, but sometimes it does not help, that why I use the web, using the search engine it is possible to locate places that peoples had a problem similar to my problem and they had been solved this problem by advice from other developer out there.

In this example I am talking about basic windows application Win32, with a wrapper window class that should hold information on child windows, that the main application needs to handle.

The problem was that when I create a child window the child handle was always null and the GetLastError() message return 0, no error.

After some web searches I found several solutions that describe the problem that I had: CreateWindow() returns NULL and GetLastError() returns 0.

You can be sure that i also try this with CreateWindowEx() and it also failed with a NULL as the return value.

The solutions that I found on the web where:

  • Verify that WM_CREATE message was covered up in my child MessageProc()function.
  • Verify that inside WM_PAINT you have the following function, or reference to a function that handle them: BeginPaint() and EndPaint() functions.

Both of the above information did not solve my problem.

The thing that I was missing in my source code was the DefWindowProc() function when returning from the child MessageProc() function.

After I added the ‘return DefWindowProc(hWnd, message, wParam, lParam)‘ line in my child MessageProc() function the child windows started to work correctly with no problem.

I hope this information will be useful to someone out there, and this is good information to beginner windows programming people out there.

I will try to bring here, from time to time, more problems and solution that i had and will have in the future, in my development path.

Please comment your solution to this problem, if you encored one.

Good Luck to you all.
The Admin.

Starting a new development project

Starting a new development project

One of the main problems of people that have an idea and want to start develop it, is that they do not know how to start the project in the right way.

Most of them just open the development environment and start coding it without paying attention to all the other stuff.

In order to accomplish a better code and from that a better application I am recommending on the following steps in developing your application.

Let see, you have an idea on your mind, you can visually it already works and you want to just sit down and start coding it, after a while your code is started to be big you starting to get lost in your code and after a while it turn to be patch of patches, this happens especially to developer that want to do their own project in the first time, but not only them.

So what do you have to do?

  1. Sit down and start write what you want your application to do.
  2. Write down a flow for your application.
  3. Try to organize it into objects.
  4. Write down what each object contains, like methods and so on (not in code).
  5. Use a source code management system (SVN).
  6. Start to build each object till it does what its need to do.

If you have all this organized, you will be able to locate problematic areas and in future look you will be able to fast track the object that has the problem and fix it, it will also give you a more easy way to update or upgrade the application by just modify the object that needs the changes.

Sit down and start write what you want your application to do:
Just take a paper or open your favorite text editor and start to write down all the things you want your application to do, everything it does, no matter if you think you are not to code it later on or not, you do not need to think as a developer, think as the user, or as a child, who is going to use the application, what do you expect the application to do if you bought it. This step is very important it will be easy for you to split it down into object later on. Think of it as the spec file for the application you’re trying to build.

Write down a flow for your application:
Think like the user, what is the flow that the application needs to do, I think it be good to split it down to several flows like, first installation of the application, first run, normal run, update, application do and so on, the more you write down the more you help yourself in the testing process.

Try to organize it into objects:
Think of it as a splitting your application to parts, each part needs to be as independent as it can, in that way you have several object each one do what its need to do. This way you will have an easy way to truck bugs location and to make application updates. If you manage to make each object a separate component, like a library or a dll, it be easy to update the application in next versions or in bug fixing, you can fix the problematic dll/object and just make an update to it and send it as an update package, using the net, or a web site. I also recommended to create/ or get a good log system that can handle log files, this way you will have a file that can be used for bug tracking and fixing. One of the best things in using object is that you can use it later on in other projects that you want to develop, this call code reuse.

Write down what each object contains, like methods and so on (not in code):
After you have the objects, you need to write down what each object needs to do, keep in mind that it good to write everything that you think this object needs to have, it actually organized what you write in the first section into their object location, even if you, in this stage, do not think you can code it nor need it, put it here, so you will have it for future use, you can always add an empty function, in the code step, that represent this part of the object, and in future version to actually implement it or removed it, according to what you think.

Use a source code management system (SVN):
A SVN will give you a great option to manage and more organized the project files, from source files to executable files. It gives you the option to roll back easy if you have any problem in the last file you work on, it also be easy to compare the file with older or newer files, and it back up all your project files.

Start to build each object till it does what its need to do:
In here you need to start works on your object, actually write the code for each object. You can start by write the function names even if the function will be empty in this part write them down, you can implement it later on, or in next version, as a programmer, sometime you start to work on one function and another one is entering into your mind and you just go to that function and start to work on it. Do not forget to add comment in front of every function that tells you what this function do, so you able to remind yourself what you thought about when you coded it. If you’re using a comment in the functions body, remember to delete them in the release version, good against reverse engineering.

Well if you start your project in organized steps you will have an easy maintenance in the future from bug fixing to version releases.

After all the development process, in my mind, is the best part, cause after the application start to run, it’s feels like you played as D”R Frankenstein and created your masterpiece.

So you want to learn a computer programming language…

So you want to learn a computer programming language…

One of the common questions that ask by beginner that want to learn to program is what language is the best to start with.
This is a problematic question and it has a lot of answers and this is due to the fact that each language had its ups and downs, I will try to explain here on several computer language and I am only talking on Windows base development, I am not going into Mobile devices or Web base technology.

One of my question foe someone that ask me the what language  question is what is your main goal, most of the people that ask me this question have an idea of some kind of application that they want to develop and this can be a good pointing start to what language to choose for.

I can tell you that to most people the C Sharp (C#) will be a great starting point to get into the development world, it is a fast, easy and have lots of document and example over the net , so a user can find a piece of code for the thing that he need and change it, update it according to what he needs.

Visual Basic .net is also a great language to start from, it is a great, easy to use language that can do a lot of things, it is more UI base language that you can do a lot of your needs using the IDE environment and then get into the code itself for changes, it support networking and other great things, and you can get into it fast.

The Java programming language is also a great language to learn, it is a pure Object Oriented Programming language (OOP)and  keep in mind that if you get into Java you be able to write code on one machine, like windows, and it might work on other machine, like Linux, with some minor changes, so this is the multi system language to choose for, there is a virtual machine that run the code in it and by that you can easy port it to every operation system that run the JVM (Java Virtual Machine).
Also a lot of distributed/multi threads/ network base application are porting to Java and if they do it, I guess they know what they are doing.

OOP is a programming method that in order to create any program you first draft it down into object when each object do its own job, and by this if you need to update or fix something you just find the problematic object and change it.
There are a lot more in OOP and this is not an OOP article, maybe I will write one in the future.

All the above languages run in some kind of virtual environment that take care for you, the programmer, for a lot of things, from memory management to security issue and so on.
If you need a language that can give you more freedom, keep on reading…

The C/C++ programming language is the language that I recommended every one that want to get into programming and that is due to several things but I think the important one is, if you know C++ you can port to any other language you want you just have to learn the syntax, C++ is the language that use in most of the inner application, include the Windows Operation System. With C++ you can and needs to use OOP, you do have to take care of everything but at the end, it worth it.

I want to add more language in here, the language is Assembler, this is a probably the harder language that you can learn those days, and some of the reasons to learn it will be related to security subjects, if you want to build reverse engineering tools or you want to research and learn how virus works or even be familiar with inner application debugging, assembler is a need to know language.

I do hope that this article give you some knowledge on what language you should learn as an entry point into computer programming, in my opinion I choose C++, with C++ you can get into most computer language one you know there syntax, even if you want to go on to web programing language like PHP it is also base on C language, so you will have a lot of knowledge on the basic syntax.