All Questions
18
questions
-4
votes
0
answers
50
views
Tetris C++ Troubles with memory leaks | code provided [closed]
Memory Loss in My Tetris Game 😓
Hey everyone,
I'm pretty new to C++ and this is my first post on Code Review, so I really appreciate any help all of you can provide. I've been working on a Tetris ...
1
vote
1
answer
162
views
C++ - Memory allocation utility functions. Is there memory leakage here?
I am quite new at C++ and I really wanna learn how to work with allocating memory.
So I have created some utility functions. I am aware that C++ uses new and ...
6
votes
4
answers
713
views
Simple Singly-Linked List class
Decided to write something simple and came up with idea to write simple single linked list in C++ to improve my knowledge about pointers and memory management in C++, and wrote this:
...
11
votes
4
answers
4k
views
C++ dynamic array implementation
As a C++ beginner coming from Java, I have become increasingly confused on the topic of memory management and how to avoid memory leaks. Is the code below risking a memory leak that I'm not currently ...
9
votes
3
answers
5k
views
A Tic Tac Toe game in C++
I am a beginner programmer and have made a tic tac toe program in c++. I need some help with my memory management can anyone review and help me. This is my code
...
2
votes
1
answer
134
views
A heap-allocated texture class for a console renderer
I am working on a console renderer and I want a heap-allocated dynamic texture class. Since I am quite new to C++, I just want to check the memory management, if I destroy all pointers correctly etc.
...
4
votes
3
answers
2k
views
A Stack Template
Why you're here:
Today I bring you a simple Stack Machine and a Lot of questions. I am trying to gain a little bit more understanding of pointers, memory management and templates and thought a Stack ...
0
votes
1
answer
2k
views
Implement a working Vending machine [closed]
Task:
Design a vending machine which does the following:
Accepts coins of 1, 5, 10, 25, 50 cents or notes of 1 and 2
User selections: Candy, snacks, nuts, Coke, Pepsi and soda
...
12
votes
4
answers
5k
views
C++ Doubly Linked List Implementation
Does anyone have suggestions on how to improve this?
Specifically:
Am I passing and returning references correctly to prevent unnecessary copying?
Am I using destructors and the delete keyword ...
1
vote
2
answers
4k
views
Perlin Noise Generator
I'm porting a 2-D Terrain Generator from Python to C++ as Python is too slow due to the number of features that have been added.
I'm new to C++ and would like to know of any criticisms that you can ...
5
votes
2
answers
3k
views
C++ object pool
I am a beginner and would like to build a pool. I made some research and found out that if my software has heavy object create and delete part, I should use a pool because of performance. I made some ...
6
votes
1
answer
28k
views
Reading from a CSV file in C++
I wrote this code to read from a CSV text file (containing data such as 12,3,568,48,3,8 with no more than 3 digits to each number). It stores the numbers as char arrays in the vector ...
3
votes
1
answer
221
views
MemoryWriter Helper class
I have created this memory writer helper to ease the write into memory process and I want your suggestions regarding it. I am very new to C++ but have 6 years knowledge of .NET languages like VB and C#...
11
votes
5
answers
2k
views
Static factory function and lifetime
I'm trying to teach myself C++ at the moment, after years of C# and other managed languages. The class in question is a Level in a game, and the idea is to ...
8
votes
2
answers
19k
views
STL Stack Implementation
I implemented std::stack from the STL for deeper understanding of the language and memory since I still am only a beginner. I implemented the stack using a singly ...