What are the best resources for understanding pointers in C++?

0
5
Asked By CodeNinja77 On

I'm currently taking Computer Science 1 at my university and we're covering object-oriented programming in C++. We recently shifted gears to discuss pointers, and I'm really struggling to grasp the concept, especially after our latest lab assignment. I'm looking for recommendations on any resources—like videos, articles, or anything that helped you understand pointers better. Any suggestions would be greatly appreciated!

3 Answers

Answered By TutorialGuruX On

YouTube is an awesome resource for learning about pointers. Just type it in, and you're bound to find some videos that explain it well. In my own view, think of pointers like signs with arrows—like a sign saying "Texas ➔" that points to Texas but isn't Texas itself. The pointer shows where to find the real data in memory, but it isn't that data itself. When you're coding in C, these pointers reference memory addresses where the actual data resides.

Answered By VideoLearner99 On

I found this lecture super helpful when I was trying to get my head around pointers: [This lecture](https://www.youtube.com/watch?v=Rxvv9krECNw). It really cleared things up for me.

Answered By TechWhiz2021 On

A great way to think about pointers is to compare them to a wall of PO boxes at a post office. Imagine each box has a number, and that number is like your pointer. When you use the pointer, it's telling you where to find the contents inside that box. Dereferencing the pointer is like opening the box to see what's inside. This visual helped me a lot in understanding the concept!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.