Skip to content

nxg9997/FunWithPointers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Fun With Pointers

A collection of demos about how pointers are used, with extensive comments to help explain everything.

About

I am a Teaching Assistant for a introduction to C++ class, and lots of confusion arises when we begin to use pointers. I created this repository so students can have easy access to useful information about pointers - how they are used, differences between the stack and the heap, things to be aware of / avoid, etc. Even if you aren't a student, you can use this as a reference (pun not intended) if you need some help working with pointers. If you have things to add/change, feel free to submit a pull request.

Outline

Demo Description
Basics A good starting place if you are new to pointers, or need a refresher on how they work
StackVsHeap Expands upon some of the concepts from Basics; Gives information about how memory allocation works on the stack and the heap, and how pointers intereact with both part of memory
Arrays Introduces the concepts of pointer arithmetic and how to use pointers to create single and multidimentional arrays
Classes Introduces the "->" symbol, and how pointers can be used with classes
Functions Explains what a function pointer is, how to create one, how they are used, and why they are used
Smart Pointers Introduces Smart Pointers, which are classes that encapsulate pointers to assist in memory management. Smart Pointers are useful for helping to clean up memory when they go out of scope

About

A demo of various things you can do with pointers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published