Posted by Spyros in C/C++ Programming, tags: c++ stacks, define c++ stack, how to create a stack in c++, initialize stack c++, stack class, stack create, stack data structure, stack detroy, stack elements c++, stack methods c++, stack pop, stack push, stack reverse c++, stack template c++
This is a guest post
Today i will talk more deeply about Stacks in C++. In the previous tutorial we just declared some methods of this class, so now let’s see their content and in future tutorials we will use Stacks in an application in C++. Let’s start with a look at the template of the class Stack one more time.
Read the rest of this entry »
No Comments »
C++ is rich because of its object oriented programming concepts. Inheritance is the ability to create a hierarchy of classes where a specific class inherits the properties of a generalized class. For example, if we consider Polygon to be a generic class, then shapes like Triangle and Rectangle can be regarded as specific classes. Surely, all the polygons have attributes like height and width, whereas the way to calculate area is different for different shapes. Read the rest of this entry »
No Comments »
This is a guest post
This tutorial is a simple explanation of some data structures that we can use in C++. I pretend you understand first how each structure works before you look at some code. However, we can’t avoid using some code and I ended adding templates of some structures. This tutorial doesn’t contain all data structures but I’m sure the most important ones are here and this will be a big help in improving your skills in C++. Read the rest of this entry »
No Comments »
This is a guest post
For those wishing to make a foray into the world of computer programming, C++ makes for one of the best entry level languages to learn. Nearly all American university courses in computing will teach their undergraduates how to program in C++, as it is very user friendly and allows for a more complete freedom of expression and ease of compilation. C++ is an object oriented version of C, one of the first widely used programming languages. Object oriented programming means that instead of telling the computer to work things out for itself, the user creates objects such as strings and arrays and uses the C++ language to manipulate them. For example, instead of writing a long piece of code to store a series of numbers and find the mean, C++ allows the programmer to create a string object, put all the numbers inside it and find the average; a much quicker way of programming.
Read the rest of this entry »
10 Comments »
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 writing a small but entertaining c++ game in just a matter of minutes or hours.
Read the rest of this entry »
No Comments »
1. C/C++ (especially C) are Low Level Languages That Allow you to Learn Important Programming Ideas
Some of you may already know how to program in Perl, Python or any other interpreted high level programming languages. While those are pretty useful for creating short scripts, they do not really help when you need to “understand” the machine. Creating more complex programs would need that you would have to have direct access over how memory is used. Pointers, for instance is something that you cannot utilize in these high level languages. Moreover, you would never need to know how a linked list works in a language like Python, because it provides you with everything you need to do these things automatically. While this might seem convenient, there will be a time when knowing what a list is, and being able to create it, will be crucial. If you are really interested about serious programming, C and C++ should be your main priority.
Read the rest of this entry »
5 Comments »