812,596 questions
-1
votes
0
answers
18
views
i'm having trouble implementing libraries in cross-platform(Windows and Linux) c++ applications
I want to clarify that I am a beginner when it comes to developing applications with low-level languages.
The problem:
I am searching for the easiest way to implement third-party libraries in my C++ ...
0
votes
0
answers
22
views
using typed template argument with default value as abstract class in c++
Using c++20, I have the following idea to generalize access to multiple chips in a circuit:
An interface should allow reading/writing to all chips with different address bits and register sizes (8, 16,...
0
votes
0
answers
22
views
Manipulate struct data vertically
I have a function that takes three structs and list of widgets. I want to link all of these widgets with particular field in struct and then process accordingly.
struct SomeStruct { QString first; ...
-1
votes
0
answers
19
views
A reasonable conversion in the member function pointer but an error occurred?
I always thought that when I converted a member function ptr in C to a member function ptr in A, I just had to make sure that the call was pointing to an C entity , but that was a mistake. Does the ...
-4
votes
4
answers
79
views
To find union of two sorted arrays
In the problem, we have to find union of two arrays sorted in non-decreasing order.
#include<bits/stdc++.h>
using namespace std;
vector<int> findUnion(vector<int>&a,vector<int&...
1
vote
1
answer
46
views
Xorg: hardware-independant way to find if physical keyboard is present
It's needed to alter GUI in order to help with input using touch screen.
Pretty sure it's possible because various high-level software suites or programming environment (java, javascripts, desktop ...
-3
votes
1
answer
57
views
C++ Injection dll export function
I am trying to inject a dll in a windows .exe process for example notepad.exe, the injection works fine but when the dll is already injected in the process and I try to call the exported function it ...
0
votes
1
answer
74
views
Compile Time unique hash for variables
is there any ways of making unique hashes for each variable in compile time.
C++ allows block scopes which can result in same named variables inside one function so i cannot just do:
#define MACRO(...)...
0
votes
0
answers
44
views
How do I pass the same array between two different modules?
I am trying to utilize modules with arrays.
I am trying to make a module that gets data input from a user's keyboard, and a different module that prints the array the user inputs (the modules are for ...
0
votes
1
answer
38
views
Creating a console window from a DLL for debugging aims
I have implemented a DLL (C++, VisualStudio, Windows), which extends function of an another program (further - main program).
I don’t know internal architecture of the main program, except it is GUI-...
-2
votes
1
answer
102
views
Operators "new" and "delete" in C++
I ran into a problem, from an exercise in Bjarne Stroustrup's book Programming: Principles and Practice Using C++ (2nd edition), at the very end of chapter 17 for the Exercises section, exercise 7:
...
0
votes
0
answers
22
views
Doxygen ignores NO_DIAGRAM
I'm documenting a C++ project with Doxygen and I want the dependency graph to only include my header file, not other libraries. I have it like this:
#ifndef CJT_ROBOT_HH
#define CJT_ROBOT_HH
#include &...
0
votes
0
answers
90
views
Is there a default build-in function or template which returns zero?
Sometimes I need a function or template which returns zero like in the example below (artificial, of course, for sake of simplicity).
I am fine to write everywhere []() { return 0.0f; }, but taking ...
2
votes
1
answer
61
views
How to call in template a function with different amount of arguments?
I want my template to take lambdas with different number of parameters and be able to handle them.
In the code below template process takes callable object (function) but doesn’t know whether passed ...
-3
votes
0
answers
41
views
undefined reference to "WinMain" [duplicate]
I am new to c++ and trying to use SDL2 on my Mingw Compiler(Msys2)
After I compiled with #include "SDl2\SDL2.h" my compiler kept giving me this message:
C:/M/B/src/mingw-w64/mingw-w64-crt/...