CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 09:25:58 GMT
content-type: text/html; charset=utf-8
cf-ray: 965b17adca7b9dfa-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=7317f3a4-db03-44c8-b99c-81be57d0f0c3; expires=Mon, 27 Jul 2026 09:25:58 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 66d8e6f6-fdc3-4310-b657-da7738b4625f
x-worker-origin-response-time: 486000000
x-dns-prefetch-control: off
set-cookie: prov=7317f3a4-db03-44c8-b99c-81be57d0f0c3; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=wXX__YMj47bSuV9PQEFmCV8_fjx1ctugIZNEcXRX6gQ-1753608358-1.0.1.1-N1AVY2XIpL3lA._FkNkSI2OBc0nnT9lAKc8mr9Y_PPYkVRtT9S9c71ETbd4h0NGUKT0nFTyHNYA8BcQ0.7YXRcZA4J.GPnX07iy7vFTQ6HM; path=/; expires=Sun, 27-Jul-25 09:55:58 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=HSS7xiT0YBRee1r0eKw_OnV7.z4YopjQ2ijDZKqTQMg-1753608358550-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'pointers' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [pointers]
In computer science, a pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address.
393 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
9
votes
2
answers
779
views
My shared_ptr implementation
I would like to ask for a code review of my shared_ptr<T> implementation for design, code style. Any nitpicks will extremely useful for me. The features ...
10
votes
6
answers
2k
views
k-Nearest Neighbors algorithm in C
I've been learning C for a while, and I decided to make a simple kNN program. What can I do to improve the program?
Am I doing memory management right? Can the structure of the code be improved in ...
4
votes
1
answer
112
views
Maze game from book Design Patterns with smart pointers and polymorphism
The Design Patterns book chapter 3 about Creational Patterns starts with a maze game. They use the maze as an example throughout the chapter and instead of rooms they have also things like enchanted ...
3
votes
1
answer
103
views
Leveraging EBCO (Empty Base Class Optimization )in a Simplified Smart‐Pointer with Custom Deleters
I’ve been experimenting with a minimal unique_ptr–style class to see Empty Base Class Optimization(EBCO) in action when the deleter is empty:
...
7
votes
3
answers
1k
views
C++ implementation of Go inspired cancellable context
I am trying to create golang inspired cancellable context in C++ for use in worker threads and other tasks. I have tried to avoid using raw pointers, but ever since I started writing C++ code, I ...
4
votes
1
answer
133
views
Compute index in a ring buffer
I have a buffer implemented as a fixed-size std::vector with two begin and end pointers ...
14
votes
2
answers
537
views
Custom implementation of `std::unique_ptr<T>`
I skimmed through the documentation on cppreference.com and put down the basic functionalities expected out of a unique_ptr<T> implementation. I coded up a ...
6
votes
2
answers
754
views
polymorphic message container [closed]
Any comments/suggestions on this design? I just want to hold onto an ordered collection of messages. Each message can be one of several types.
I'm using some code analogous to this currently in a ...
5
votes
3
answers
339
views
Implementation of arrays that store their size
In this code I implemented arrays that store their own size before the first element. To access it you need to go back exactly sizeof(size_t) bytes back. To free it,...
3
votes
2
answers
149
views
Todo List app using C
I just learned to deal with pointers and memory allocation stuff. Using that, I built a todo list app, and it works as far as I tested it.
I didn't account for many user errors, so any suggestion to ...
5
votes
3
answers
849
views
Safe(r) / Easier Pointer Allocation Interface in C (ISO C11)
I spent like half an hour programming up a set of functions to make the allocation / deallocate of pointers easier within a bigger project. I felt that they were satisfactory, but was wondering if ...
1
vote
1
answer
175
views
A unique_ptr-like class, for spans instead of raw pointers
Introduction / Motivation
I like the CADRe (a.k.a. RAII) resource management idiom in C++. And I like std::span's; or perhaps I should say, I dislike the use of ...
3
votes
1
answer
95
views
Compare and merge sets from unstructured variables for automatic differentiation
I have developed an automatic differentiation module for my software. Usually AD comes in two forms; forward mode or reverse mode and very clever approaches, beyond me, might mix both. Typically the ...
4
votes
1
answer
178
views
Trie implementation using std::shared_ptr
I've implemented a basic Trie that is supposed to work only with lowercase English letters.
...
2
votes
2
answers
287
views
Optimizing Subarray Removal: Can the Removal Process be Enhanced for Better Efficiency?
The only requirement is that it has to be done by pointers:
And it returns the amount of removed numbers because of the way of output that is set in the main.
The function, using exclusively pointer ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
c++ × 251
c × 114
c++11 × 84
memory-management × 57
linked-list × 55
beginner × 37
strings × 31
array × 29
object-oriented × 17
c++17 × 16
c++14 × 14
template × 13
stack × 10
tree × 10
c# × 9
algorithm × 9
design-patterns × 9
performance × 9
raii × 7
queue × 6
reference × 6
rust × 6
graph × 5
more related tags
Hot Network Questions
- How does one justify the rationality of buying insurance?
- Lay explaination of 'lower evolutionary constraint genes'?
- Humans on alien planet get tailed by silent humanoids
- Did Denmark report that 64% Palestinian refugees from 1992 received serious fines or jail time?
- Anonymizing a submission for double-blind review
- Easy ways to draw vector diagrams in TikZ?
- Moving multiplying cells away
- How to extend an MDF shelf?
- How should one pronounce plural French-derived German words?
- When was the last time all humans were on the ground not in the air?
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Word order for a phrase with a number, adjective and noun
- Symbols for A.P. Morse's book in Set Theory
- Question about relativity of simultaneity vs signal delay
- What does this word "ahn-shdah-heh" mean?
- Story that taught cryptography in the form of a manga
- Kepler's first law proof error - can anyone help me see what the error is?
- Is this a violation of open source?
- How to put commutative symbol in a commutative diagram?
- How many simple groups are there of a given infinite cardinality?
- What is the citation for Augustine's "consensus, non concubitus..."
- I don't understand Photos Library.photoslibrary
- Book recommendations for theistic books about God's existence
- Do TeX engines support Shavian OpenType fonts?