123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|546|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> C++ class, week 6

Sat, 31 Oct 2009, 08:52
Afr0
Welcome to Socoder's official C++ class!
This week we read about managing memory.

Questions

1. What is the size of the string 'Hello World'? What is the length of this array named s?

char s[] = "Hello World!";

2. List five reasons to use pointers.
3. What are the problems with the "Tic Tac Toe" game at the end of the chapter? How can you improve the game?
4. List three reasons to use dynamic memory.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Mon, 02 Nov 2009, 07:30
Afr0
1. Length is 12 characters.
Size is 13 bytes.
2.

Pointers ultimately give you more control over how your memory is used.

Using pointers as function arguments can greatly increase the efficiency of your program by saving the amount of copying required, especially in the case of large datatypes.

Pointers allow you to create dynamic arrays!

Pointers can make your code less verbose.

References!!

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!