
please wait
by fernando
C++ today
|
Hi everyone, I've been out of the scope from C++ for years and I would like to get back on it. I usually worked with eclipse environment what was OK about wha... |
Sep 30, 2022 at 10:13am
[4 replies] Last: ... and there are a few decent libraries around on public git repos no... (by kbw)
|
by LukeProducts
Is md5 input plain limited to 32 chars ?
|
Hello all, in cannot understand why you can pass more than 32 characters into the md5 hash function. Ive seen the Implementation of mfontanini ( https://github... |
Sep 30, 2022 at 10:08am
[11 replies] Last: I use the MD5 from openssl. md5.hpp #pragma once #include <openssl/... (by kbw)
|
by new1
Random hex code generation saving
|
Hi, I'm trying to generate a hex random generators and catch it in 2d array. ex o/p random hex: 0x12 0xff 0x34 0x3e 0x00 0xef 0x01 0x43 0xb3 .. ..... |
Sep 29, 2022 at 5:47pm
[6 replies] Last: Is there any better way for generation of hex As jonnin mentions if ... (by deleted account xyzzy)
|
by Cplusc
get a digit of an enum
|
hello forum I have a enum data type which is enum Type { D1Q3, D2Q9, D3Q19, D3Q27 }; The first number is the dimension of my problem and the second n... |
Sep 29, 2022 at 2:46pm
[10 replies] Last: I really do not understand why the language is still missing simple en... (by helios)
|
by seeplus
ranges split
|
This code works as expected and produces the expected output: #include <string_view> #include <ranges> #include <iostream> #include <vector> #include <iomani... |
Sep 29, 2022 at 9:51am
[8 replies] Last: For info, we've decided to use: template<typename T = std::string_v... (by seeplus)
|
by t im
About multi level pointer
|
Here is a code about multi level pointer: double* (*a) ; cout << sizeof(a) << endl; // 4 cout << sizeof(*a) << endl; // 72 cout << sizeof(**a) << endl... |
Sep 29, 2022 at 8:02am
[2 replies] Last: Thanks a lot for your detailed reply. I got it. (by t im)
|
by JUANDENT
How can I create a concept that tests for specialization?
|
Hi, I want to create a concept that can only be applied to std::vector<T> for any T... Some predicate like is_specialization_of ... Thanks |
Sep 28, 2022 at 4:00pm
[4 replies] Last: Maybe in C++26... (by seeplus)
|
by t im
Decompose Number with Prime Factor
|
Given a number n, Here are two operations can be taken: * n - 1 * n divide by its prime factor Question: In order to decompose n to 1, what is the minimal o... |
Sep 28, 2022 at 11:34am
[6 replies] Last: Oh, I misread that. (I’m bad at that, it seems.) (by Duthomhas)
|
by marhuum
Need g++ all compilation work files in some location
|
How do we put gcc/g++ all compilation work files in other certain directory ? |
Sep 28, 2022 at 2:59am
[1 reply] : The location and the names of auxiliary and dump outputs can be adjust... (by JLBorges)
|
by JamieAl
Error in copying element of one array to another in C++
|
This is a very simple issue that for some reason I am not sure why I keep getting wrong. I am basically trying to copy array ``n`` to array ``dummy`` as the fol... |
Sep 27, 2022 at 10:58pm
[6 replies] Last: You can do the copy with something like [ ] real_buffer from_plain_... (by mbozzi)
|
by marhuum
Loop by use of `:` specification and/or definition
|
What exactly is a c++ loop by use of : definition, how define its upper limit? is its equivalent to the common loop for (int i=0; i<5; ++i) { cout << i ; } ... |
Sep 27, 2022 at 7:10pm
[3 replies] Last: As described in that cppreference page, the for ( int i : n ) { cou... (by keskiverto)
|
by vlnikolic
creation of simple tree like structure using stl vector c++, need help : )
|
i would like to create a tree like structure in c++. since the number of children per node is arbitrary i would like to use stl vector for tree creation. ... |
Sep 27, 2022 at 8:47am
[8 replies] Last: When we did this at Univ in the dim and distant past, we had the examp... (by seeplus)
|
by JUANDENT
What is an "exposition-only alias template"?
|
For instance at https://en.cppreference.com/w/cpp/iterator/forward_iterator: Definition of this concept is specified via an exposition-only alias template... |
Sep 27, 2022 at 12:30am
[2 replies] Last: well thanks (by JUANDENT)
|
by KaiTang
About Base class call subclass function
|
like this code #include <iostream> class A{ public: A(){show();} virtual void show(){std::cout<<"A::Show()"<<std::endl;} void test(){show();} }; class ... |
Sep 27, 2022 at 12:11am
[13 replies] Last: Although this is OK, the inheritance relationship is wrong. B must inh... (by KaiTang)
|
by marhuum
A tool to have/look the C++ interpretation from a template?
|
Is there any tool to have/look the C++ interpretation from a template form syntax to its expansion/substitution before it really gets compiled to object/binary? |
Sep 25, 2022 at 8:57am
[1 reply] : C++ Insights tries to do something like that: https://cppinsights.io/s... (by Peter87)
|
by marhuum
C++ template for function need be in compile time
|
is template for function changes syntax at compile time or no, e.g. template<bool o> test(int& pos, int depth) { int cnt, n = 0; bool a = (depth == 2); ... |
Sep 24, 2022 at 3:58pm
[1 reply] : as o is a templated param, you use a constexpr if for it to be evaluat... (by seeplus)
|
by marhuum
On coming across #include <condition_variable>
|
Reading #include <condition_variable> on analyzing one's project code what is it all about without yet get into very detail breakdown ? |
Sep 24, 2022 at 1:42pm
[3 replies] Last: The condition_variable class is a synchronization primitive that can b... (by Geckoo)
|
by marhuum
Anonymous or no name namespace
|
Anyone outright understand what the necessary and purpose of bare, i.e. no name namespace ? |
Sep 23, 2022 at 9:05pm
[4 replies] Last: unnamed namespace is not an alternative to a named namespace. It's an ... (by Cubbi)
|
by leo2008
integer hang forever
|
I am trying to solve the below problem, but my code hangs for ever and doesn't generate any output. Not sure what went wrong here? https://www.chegg.com/h... |
Sep 23, 2022 at 12:35pm
[12 replies] Last: Hi seeplus I was not aware about std::stoi(), until you told me. Anyh... (by leo2008)
|
by marhuum
what is the m()->v
|
On reading one's C++ code, wondering what exactly the below means (without yet finding his code line on m declaration/definition) m()->value as we kno... |
Sep 23, 2022 at 6:43am
[5 replies] Last: I just wanted to have an object to return a pointer to. If you want yo... (by Peter87)
|