Hello everyone, please i am looking for answers to the C++ questions which will be posted below. I beg of you, don't just ignore it, just help me out, please. Thank you very much for your help.
http://img59.imageshack.us/img59/7296/untitled2vm0.jpg
This topic is locked from further discussion.
Hello everyone, please i am looking for answers to the C++ questions which will be posted below. I beg of you, don't just ignore it, just help me out, please. Thank you very much for your help.
http://img59.imageshack.us/img59/7296/untitled2vm0.jpg
Umm, help me understand why we should be doing your homework?xaos
It's not my Homework, you can check the "month", it's an old document.
[QUOTE="xaos"]Umm, help me understand why we should be doing your homework?THESEVENTROLLS
It's not my Homework, you can check the "month", it's an old document.
Fair enough; my apologies. Do you have a basic understanding of pointers? Essentially, they are just variables that contain memory addresses, generally with weak typing information. One key benefit is that they make it possible to use the heap (dynamic memory allocation) so that all variables need not be statically defined at compile-time. This becomes critical among applications that deal with lists, arrays and so on. By the way, arrays in C and C++ are just pointers by another name, and their contents can be addressed through pointer arithmetic or the array subscript operator. Also, when sorting (such as sorting a linked list), it becomes easy to sort them by changing pointer values to next and previous links, rather than moving data around in memory, a much more expensive operation. One of the most common errors in C and C++ code is allocating memory off the heap and failing to release it, leading to memory leaks. This is so common that entire products exist to deal with it, and more recent languages like Java and C# have a builtin concept of garbage collection, where objects are allocated, reference counted and deleted by a system process when their reference count equals zero.Please Log In to post.
Log in to comment