https://github.com/hazeliscoding/pointer-notes
A cheatsheet to help anyone understand pointers in C++
https://github.com/hazeliscoding/pointer-notes
Last synced: 23 days ago
JSON representation
A cheatsheet to help anyone understand pointers in C++
- Host: GitHub
- URL: https://github.com/hazeliscoding/pointer-notes
- Owner: hazeliscoding
- Created: 2025-11-13T20:06:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-11-13T20:07:20.000Z (7 months ago)
- Last Synced: 2026-01-11T12:59:45.760Z (5 months ago)
- Language: C++
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pointer Cheat Sheet (C++)
A small C++ program that demonstrates:
* Passing by value
* Passing by reference
* Passing pointer addresses
* Stack scoping behavior
* Basic logging to console / debug window
Originally written to help beginners understand how data moves around in memory.
---
## 📦 Build & Run
### **Windows**
Requires **CMake** and **Visual Studio 2022** (or Build Tools).
```powershell
mkdir build
cd build
cmake ..
cmake --build .
./Debug/pointer_cheatsheet.exe
```
Or simply open the folder with Visual Studio and press **Ctrl + F5**.
### **Linux / Mac**
Requires **CMake** and a C++17 compiler (g++ or clang).
```bash
mkdir build
cd build
cmake ..
cmake --build .
./pointer_cheatsheet
```
---
## 📁 Project Structure
```
src/
Log.h
Log.cpp
main.cpp
CMakeLists.txt
```
---
## ✨ Notes
* On Windows, “debug window” logs use `OutputDebugString`.
Use Visual Studio or DebugView++ to see them.
* Console logs print normally everywhere.