Added: 4 years ago
From: jrockpunk1
Views: 10,987
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • Pointers simply allow direct memory access. That is the basics. You can assign an address for a pointer to point to in anyway you want. for example.

    int *ptr = (int*)100;

  • hey bro, do a search for camtasia, its the best screen recording program ive found, you can find a free download of it somewhere on the internet

  • Quite a few mistakes are in this video...

    You should AlWAYS initialise a point = 0, otherwise it can overwrite other memory cells..

    What you said at the beginning isn't true, you can access the data that the variable is pointing to:

    int x = 4;

    int *px = NULL;

    px = &x;

    cout << *px << endl;

    Would output 4.

  • rhillner : yes i know that now about initialising to a null value, but didnt at the time :P and i never said you couldnt access the value allocated to the memory address. i just said that by default the pointer point to a men=mory cell. you can then display the value of the variable allocated to that memory cell by doing what you did.

  • Comment removed

  • You explained the concept of pointers quite well, but you didn't explain the use of astreiks and the address caller. Other than that, it will be a good intro to someone who knows nothing about pointers. Good Job!

  • jwtguy : thanks. and i know im not very good at explaining. i dint really explain the concept of dereferencing etc.

  • Better job than I could have done

  • lol i doubt it. but thanks :D

Loading...
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