
please wait
by zzzhhh
Why is const gone in the return type?
|
template <typename T> const T&& Test(T&& t) { return t; } ...... int i = 0; int&& irr = std::move(i); decltype(Test(irr)) t = i; Since there is a `const` ... |
Jun 29, 2024 at 3:12pm
[5 replies] Last: @Peter87: Thank you for referring me to the relevant Standard. I think... (by zzzhhh)
|
by bkelly13
Convert binary to base 58
|
I want to convert a long binary number, 256 bits, into a base 58 char array using c code. I cannot find a simple explanation. The Bing tool insists on convert... |
Jun 24, 2024 at 11:55pm
[10 replies] Last: I get the same result on those 2 sites (dcode only accepts decimal inp... (by DizzyDon)
|
by Ch1156
Best way to modify a variable in a class (1,2,3,4)
|
So whats the best way to modify a variable in a class? Below I have a version that does so through a pointer, but is it better to just make a function that modi... |
Jun 23, 2024 at 9:14am
[63 replies] Last: I suggest you look into OOP class design using UML etc. This will give... (by seeplus)
|
by learner999
Finding minimum element of a tuple on the basis of first element
|
Hello everyone, I do not know, if it is possible to find the minimum first element in a tuple without using sort function. I have a tuple like this : data=[... |
Jun 23, 2024 at 9:11am
[5 replies] Last: I have a tuple like this : data=[ ( 23, a, 3.78, d), ( 11, x, 5.8, w)... (by seeplus)
|
by zzzhhh
Which ctor of std::unique_ptr is used, when there is a user-defined deleter which is a function?
|
Following is excerpted from section 12.1.5 of text "C++ Primer", which contains text and code constructing `std::unique_ptr` with a user-defined deleter which i... |
Jun 20, 2024 at 4:57pm
[1 reply] : The code calls constructor 3 or 4. When the cppreference page writes ... (by Peter87)
|
by Brian845
txt file to vector giving wrong values
|
I'm loading a txt file into a vector using the code I've written below. It works great except for one BIG issue i'm having. First I'll give a very small exampl... |
Jun 19, 2024 at 1:41am
[11 replies] Last: There's a good (and free) set of C++ tutorials and lessons available o... (by deleted account xyzzy)
|
by zzzhhh
Why can't assign an overloaded function to std::function?
|
int add(int i, int j) { return i + j; } std::string add(const std::string& s1, const std::string& s2) { return s1 + s2; } ... std::function<int(int, int)>... |
Jun 17, 2024 at 11:23pm
[1 reply] : There is a constructor template and a class template in play here, and... (by mbozzi)
|