Please,IMPORTANT C++ QUESTIONS [Please i beg of you, don't IGNORE this, thanks]

This topic is locked from further discussion.

Avatar image for THESEVENTROLLS
THESEVENTROLLS

353

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1 THESEVENTROLLS
Member since 2006 • 353 Posts

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

Avatar image for elmetfano
elmetfano

4122

Forum Posts

0

Wiki Points

0

Followers

Reviews: 8

User Lists: 0

#2 elmetfano
Member since 2006 • 4122 Posts
what subject is this?
Avatar image for THESEVENTROLLS
THESEVENTROLLS

353

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3 THESEVENTROLLS
Member since 2006 • 353 Posts

what subject is this?elmetfano

C++ programming technologies

Avatar image for 194197844077667059316682358889
194197844077667059316682358889

49173

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#4 194197844077667059316682358889
Member since 2003 • 49173 Posts
Umm, help me understand why we should be doing your homework?
Avatar image for juggernaut8419
juggernaut8419

872

Forum Posts

0

Wiki Points

0

Followers

Reviews: 1

User Lists: 0

#5 juggernaut8419
Member since 2003 • 872 Posts
I would have no problem helping you understand pointers but I don't like just giving people answers. Also that image is quite large making it annoying to look at in my browser on my laptop.
Avatar image for THESEVENTROLLS
THESEVENTROLLS

353

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#6 THESEVENTROLLS
Member since 2006 • 353 Posts

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.

Avatar image for 194197844077667059316682358889
194197844077667059316682358889

49173

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#7 194197844077667059316682358889
Member since 2003 • 49173 Posts

[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.
Avatar image for MeanQuestion
MeanQuestion

4456

Forum Posts

0

Wiki Points

0

Followers

Reviews: 1

User Lists: 0

#8 MeanQuestion
Member since 2004 • 4456 Posts

Just read the chapter(s) in your text book on pointers... then maybe write a few simple programs to reinforce that.

It's kind of an abstract concept, but once you understand them they're extremely simple.