Beginners - July 2023

thread pool library
 
Hi I am using this thread pool library: https://github.com/Ethan13310/Thread-Pool-Cpp/tree/master I am using the following code: #include <threa...
[1 reply] : Probably for the same reason you cannot pass references through the st... (by Peter87)
in what case should i use function name rather than function pointer
 
as i know, when assign a function to a variable, it generally decay into a pointer. void fun(){;} auto pt = fun; // type of pt is void (*)() auto& reffun = ...
[3 replies] Last: Perhaps it's analogous to why you may want to use references in genera... (by Ganado)
"use of deleted function" error when I'm passing an object through a constructor.
 
Hey guys! I'm working on a little program that turns TODO comments into GitHub issues. Everything was going fine until I started working on my parser. Whenev...
[3 replies] Last: In get_token() L92 and L97, shouldn't the bool condition for is_commen... (by seeplus)
Implement Prim’s algorithm using ADT with a time complexity of O(n2).
 
Use an AI tool and generate C++ code that will implement Prim’s algorithm using ADT with a time complexity of O(n2). I should adapt the code to read from...
[5 replies] Last: You don't need L25-30. This can be done as part of L23: vector<vect... (by seeplus)
BST
 
What I've Written, I may not change,but can someone help with the 4 functions I made comments for? class BST { public: TreeNode* root; //mem...
[8 replies] Last: Thank you seeplus, I have fixed the issues, code is working. (by anonomyss)
by Ch1156
Forwarding constructors (1,2)
 
Normally when inheriting you have to write in the arguments to the bases constructor in the derived class, is there any way to make this easier? for example I h...
[29 replies] Last: In general a function should do what its name implies - with preferabl... (by seeplus)
  Archived months: [jun2023] [aug2023]

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