All Questions
814,943 questions
0
votes
1
answer
23
views
QML Module not installed (C++ backend)
I'm trying to make a C++ backend class with QML_ELEMENT macro visible to App.qml, but it doesn't work. I've added qt_add_qml_module to CMakeLists.txt, but it doesn't seem to create the module. Here ...
1
vote
1
answer
58
views
Why does cpp execute 2 different implementations of the same functions based on the ability to evaluate the result in compile-time?
In the following code, two completely different implementations of std::find are used depending on whether the comparison can be performed at compile time. If the compiler can compare the const char* ...
-3
votes
0
answers
43
views
RegEx with ASAN crashes the application
On https://regex101.com,
when I do this:
Put primary key\(* as a regular expression.
Put CREATE TABLE "leagues"(id integer primary key, name varchar(100), drafttype integer(1), scoringtype ...
-2
votes
0
answers
45
views
how to draw a time series graph with proper lables and texts in it [closed]
I wanted to make it specific to some language like java, python, c++, etc. But later I decided to keep it generic.
Actually, I am working on a task to create a UI that properly displays the data as a ...
-4
votes
0
answers
44
views
Removing the Title bar [closed]
I am wanting to make a custom title bar for my application. I am using c++ and WebView2. since I have some experience in making a website I thought this would be the best way to go, but I just can not ...
0
votes
2
answers
101
views
Declaring member variables in a class interface header file
Having a Java and C background, I am currently learning C++ with an old but good book which explains that all members of a class including variables have to be declared but not initialized in its ...
1
vote
1
answer
66
views
Struggling to conceptualize Look At Matrix
I was going through the learn OpenGL book's ch. 10 on cameras, and got to the following line of code:
glm::vec3 cameraPos = glm::vec3(0.0f, 0.0f, 3.0f);
glm::vec3 cameraFront = glm::vec3(0.0f, 0.0f, -...
0
votes
0
answers
54
views
gcc 15.0.2+mingw 13.0.0 libstdc++-v3 build error
I'm trying to build mingw 13.0.0 with gcc 15.0.2 toolchain on Windows using another mingw 13.0.0 with gcc 15.0.2 build under busybox shell. As described in this tutorial, I first configured, built and ...
4
votes
1
answer
166
views
Why is `iota(0) | common` not a `random_access_range`?
We can use iota as a random_access_range:
static_assert(random_access_range<decltype(iota(0))>); // ok
cout << (iota(0))[1]; // 1
However, if we pass it via the range adapter common to ...
0
votes
1
answer
84
views
Leveldb, cmake and c++20 (‘memory_order_relaxed’ is not a member of ‘std::memory_order’) [closed]
1. Issue
After update cmake to use c++20 with set(CMAKE_CXX_STANDARD 20), the following errors appears when compiling the dependency leveldb
[ 11%] Built target glfw
[ 15%] Built target raylib
[ 16%] ...
0
votes
1
answer
85
views
Undefined symbol in Visual Studio 2022 clang-cl
I'm trying to compile one Intel Pin function in Visual Studio 2022 in clang-cl compiler.
I compile it with clang-cl because the new Pin 4 has only clang compiled version.
VOID Image(IMG img, VOID *v){...
4
votes
1
answer
151
views
How to calculate magic constants for divide-by-multiply for constant modulo operation
I'm trying to replicate the "divide by multiply" optimization done in clang (and probably other compilers) when performing the following operation (for use in my own compiler):
bool modulo(...
0
votes
0
answers
59
views
How to convert a region to a Polygon? [closed]
I have a matrix and I can extract color regions as std::vector<std::pair<int, int> > and I want to convert them into Polygon Boost objects. I have yet no idea how to proceed.
Here is a ...
3
votes
1
answer
71
views
How does one use GTK Constraints/ConstraintTarget with gtkmm?
Specifically, I am trying to constrain a label to have a width no greater than a (class derived of a) scale. Both are placed within a (class derived of a) grid.
TLDR: How do I pass the widgets as ...
-4
votes
2
answers
109
views
How to check, and add, a user to a user database map?
This is my current code. Is there a way to check the user_db map to see if the username a new user adds is already there, and if they are then add them to the database with their own password?
#...