Beginners - December 2022 (Page 2)

Compile Errors of Substring Sort Program
 
Need help in fixing compile errors using VS2022 please: Error (active) E0757 variable "size_t" is n...
[6 replies] Last: As a first refactor (keeping char* instead of using std::string), poss... (by seeplus)
C++ Design Pattern
 
How to fix compile errors with VS2022 please? Following programs are from Professional C++ 5th edit...
[2 replies] Last: Thank you AbstractionAnon. Fixed the import & exports correctly. And t... (by AlexCantor)
Help me with my first OO project
 
Hi everyone, I started working on my first "real" object-oriented project. It is supposed to be a...
[7 replies] Last: A suggestion when dealing with a lot of code (a lot is a relative term... (by George P)
Unable to access elements of vector<vector<?>>
 
I have this class where the only atribute is a vector<vector<?>> like this: class Test { private:...
[10 replies] Last: [quote=LtL]Every time you found some unexpected errors or sth., give y... (by Peter87)
compiler warning about class with no virtual constructor when there is one
 
I have this base class class Netpbm { protected: char magicNumber; int width; int heig...
[17 replies] Last: [see reply to https://cplusplus.com/forum/beginner/285133/ ] (by seeplus)
Code compiles without errors or warnings, but execution gives segmentation fault error in some cases
 
The code below is a short version of the project I am implement right now, which is a executable (ht...
[10 replies] Last: With this suggested code, I still got the same error, but now with th... (by seeplus)
std::bad_alloc for merge sort
 
For merge sorts I've been dealing with this error for quite sometime and cannot figure out how to so...
[2 replies] Last: I've been dealing with this error for quite sometime and cannot figur... (by seeplus)
discrete distribution
 
I'm familiar with discrete and weighted distributions,I just can't seem to figure out how to do what...
[8 replies] Last: Yeah, std::random_device was broken in some old versions of MinGW. Yo... (by Peter87)
unknown type name error in Vitis
 
Hi folks. i works on Vitis environment which is based on eclipse. I have very complex code, with...
[11 replies] Last: Thanks guys appreciate 🙏 (by Jonathan100)
First use of template for array type
 
Windows 11, Visual Studio 2022, C++ This is my first attempt at a template. It will compare two ar...
[4 replies] Last: I don't know how the VS debugger works but perhaps you where stepping ... (by Peter87)
Need help in fixing include .h file
 
I am trying to compile couple of Functional C++ programs using Ranges feature from the following boo...
[5 replies] Last: Is GCC version you have used 12.2 released on Aug 19, 2022 ? No. It'... (by Peter87)
Supply a vector input with uint8_t array
 
Windows 11, Visual Studio 2022, C++ I know basic C/C++ but not vectors. I found code that does bas...
[3 replies] Last: I did not know that I wanted a vector of vectors, but that does work. ... (by bkelly13)
class atributes being corrupted after initialization of object
 
I have trying implement this class class Bitmap : public Netpbm , where the subclass Bitmap has a ...
[9 replies] Last: As a first refactor, consider (NOT tried): #include <algorithm> #in... (by seeplus)
C++ vs MATLAB for loops syntax
 
I was trying to use the function rand() in C++ to reproduce some for loop results from MATLAB. Are t...
[8 replies] Last: ouch, twice I have looked at that and took it to be some C extension i... (by jonnin)
Getting weird output when trying to pull info from file and then display it on screen
 
As the title says I am trying to pull info from a file, calculate GPA with file info, and display it...
[3 replies] Last: You haven't provided a sample file input so I can't easily test, but c... (by seeplus)
isdigit not working with map
 
So my program runs... kind of. If I assume the user inputs an integer it works fine, however if they...
[9 replies] Last: It's often useful to have a function that displays a prompt and obtain... (by seeplus)
December 2022 Pages: 12
  Archived months: [nov2022] [jan2023]

This is an archived page. To post a new message, go to the current page.