Tag Archives: pointers

Heap vs. Stack in C++

After the study of pointers versus references, the second natural question that comes in head of a ex Java developer turning to C++ is: “What are the difference between static and dynamic memory allocation in C++?” which can be translated as: “When should I use the stack and when do I have to use the

Reference vs. Pointer

In Software Engineering Project course we need to learn some C++ to develop the project. A question that some programmers have when passing from Java to C++ (like me) is “Which are the differences between pointers and references?“. You can find a lot of answers around developers forum, but I summarized them in the following

Object Oriented Memory Management

Major Update on 10th April 2009, inclusion of C++ programming language! Updated on 18th April 2008, a complete example on stack and heap Updated on 15th April 2008, new contents and new layout! Updated on 6th April 2008, new contents! The paper you can download from here is about a model for memory management during

Sorting array elements with C language

UPDATE 17:19: it seems that the program I implemented today uses a kind of Bubble Sort algorithm, give it a try, it’s quite interesting! After 3 long days studying C, I think I’ve assimilated a good knowledge base for the incoming semester. So there is a tiny C program that sorts the elements of a