0x00 How to C++ Dynamic memory tutorial Advanced topic HD Full coding video

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,820
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 23, 2009

This is a full video explanation, as i go through the coding with you on how to
use dynamic memory to store information at run-time.
This is an advanced topic, but required to do most anything in C++ thats worth doing.

Game programming, large apps (photoshop?) OS programming (yay linux open source)
and so on! any serious programmer should learn this fast 10min video.

NOTE: Still dont understand, watch again, code along and see.
Pause as you go, print the code and read it.
This is the most basic example of it, and you wont find it much easier.

Category:

Gaming

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (samljer)

  • Dynamic memory is something that isnt set aside at compile time, where as hard coded is...

    For example, your program loads a dbase from file when started

    you dont know the number of classes or even INT array or whatever you would need.

    the only way to have an array for example that can change in size in your code, would be to make it dynamic in memory

    EX2:

    You cant have dynamically changing memory without making it dynamic in the first place.

    -- Arrays that change size while running.

  • Yea I've watched some Standford c++ lectures about memory allocation and much more.

    But combining their explanation and your video + comments made it pretty clear now, thanks.

    Still struggeling abit with using it but it'll take some time to fully understand it i guess :p

  • This is what i did to grasp it.

    Write a program that picks a random number

    then creates an array of that size.

    then fills it with random numbers.

    Accomplish that, and your golden.

  • I've got a question. Why whould you dynamic memory? I mean, whats the difference betweeen these 2:

    int main(){

    int a = 100;

    int *b = new int;

    *b = 100;

    }

    It looks the same for me.. (dont blame me, im used to PHP :p)

    Can you maybe give a good example why you need dynamic memory?

  • Another thing to keep in mind is

    if you SOMETIMES need a variable while running and sometimes DONT

    int a = 100; "always exists, always takes up memory"

    int *a = new int;

    a = 100;

    (int a) now only exists if u need it to

    Not all programs will execute all branches of code.

  • Remember to network with other programmers! Add me to your network! subscribe. Im here to help

Video Responses

This video is a response to C Programming Tutorial - 9 - Do While Loops
see all

All Comments (3)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more