CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 17:29:39 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
cf-ray: 96559ed0ddccc169-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=93b59e9a-245c-4d4a-823a-4552344674fe; expires=Sun, 26 Jul 2026 17:29:38 GMT; domain=.stackexchange.com; path=/; secure; httponly
set-cookie: prov=93b59e9a-245c-4d4a-823a-4552344674fe; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=aIpQDMXbnHCwqEwEvk.1MXwP.TuSnWD8WVw23Ju34Ws-1753550979-1.0.1.1-ZJMbk8k0YKpTVHGl8.ZRq5WunzdSAjMG4rfxwbe2jQW6LnZKgZRrhnBgGb9EoTbLPB6o_HoX4i6kweWnGif.t3wHR4LkXp4kitIpzx7JCXQ; path=/; expires=Sat, 26-Jul-25 17:59:39 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=2kin9JY5lD9eet8bhWWDH_hz6Zw9w.mm.mn.QtElg1E-1753550979259-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
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: 12ba23e7-147c-4f80-931e-135521b2a37f
x-worker-origin-response-time: 534000000
x-dns-prefetch-control: off
server: cloudflare
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
286
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
- Forces applied to a car hood while driving
- A question about as ..... as comparison
- Balancing a Holy Water Bomb
- Heavy shelves, but not a center stud
- Are birth control pills classified as a carcinogenic at the same level as asbestos and tobacco?
- Weird TV balun cable
- How to Mint or Apply Confidential Tokens to Non Associated Token Account
- How should one pronounce plural French-derived German words?
- I don't understand Photos Library.photoslibrary
- Why is 0.0 printed as 0.00001 when rounding upward?
- How to navigate in the Universe's Heat Death
- About security concerns using in find -exec vs interactively performing the same task
- Where did the name of Windows XP come from? Was it connected to the Cairo project?
- What does "enter the hold at arden" mean
- How many simple groups are there of a given infinite cardinality?
- How to extend an MDF shelf?
- Why does the "gap method" give 35 instead of the correct answer 50 for non-adjacent arrangements in a circle?
- Mars colony book I read in the 80's. The name?
- Can authors be blacklisted by academic publishers for multiple rejections without any ethical misconduct?
- What does this emblem mean?
- How can I evenly space my instances after they've been progressively scaled?
- Access denied attempting to delete file on Windows Server
- Heretofore I think I have been using 'heretofore' incorrectly
- Quadratic Hecke characters with certain given local components