Skip to main content
Filter by
Sorted by
Tagged with
Advice
2 votes
4 replies
66 views

Does anyone know if there is, in c++, any way to determine at runtime the cpu characteristics of the machine that compiled the code? For example, in gcc (which I'm using) the preprocessor variable ...
user3195869's user avatar
2 votes
0 answers
41 views

Let's say that we have a simple main.cpp file which contains only a single call of a function bar which is defined in the module a: import a; int main() { bar(1); } Then let's take a look at the ...
siga's user avatar
  • 451
2 votes
2 answers
91 views

This is an attempt to make an alias to an anonymous class: struct { int i = 0; } a; // error C7626 in MSVC using A = decltype(a); This produces an error in Visual Studio: error C7626: unnamed ...
Fedor's user avatar
  • 24.7k
-3 votes
0 answers
92 views

A string literal is of type const char [N], and you can pass this type to a templated function that looks like: template <uint64_t N> void func(const char (&arg)[N]); On cplusplus.com, ...
Zebrafish's user avatar
  • 16.3k
0 votes
2 answers
119 views

Could we add elements in a vector<int> n; with cin >> n[i]; in a loop in C++? Just interested in knowing and it's my first experience using stack overflow.
volodkya's user avatar
0 votes
0 answers
136 views

I'm interesting in possible implementation approaches for a quite special variant of a list, with the following requirements: Efficient inverse lookup ("index of"): "give me an index ...
cubuspl42's user avatar
  • 8,581
5 votes
1 answer
101 views

Both GCC and Clang reject extern "C" static void foo() {} but accept extern "C" { static void foo() {} } Aren't these supposed to be equivalent?
yuri kilochek's user avatar
0 votes
0 answers
45 views

A request from a standalone application to the sharedWithMe [1] endpoint returns only one item. Scopes used for authorization are: files.readwrite.all group.readwrite.all sites.readwrite.all ...
josuegomes's user avatar
0 votes
1 answer
61 views

With my code which is just a regular RAW input example.... WM_INPUT, RIM_TYPEMOUSE... I'm getting on Windows 10 the full 1,000Hz of my mouse and on Windows 11 I'm getting about 128Hz. How to fix this ...
Gr3g's user avatar
  • 21
Best practices
1 vote
7 replies
77 views

I have two numerical maths libraries given by DLLs (I am under Windows) and header files. (I can't modifiy the headers and anyway there are dozens of them. I also don't have have access to a code that ...
Olórin's user avatar
  • 3,881
Best practices
0 votes
7 replies
153 views

My confusion is about the return statement inside readFileContents: The function returns std::optional<std::string>, but the local variable is a std::string. NRVO doesn’t apply here because ...
sam's user avatar
  • 911
0 votes
0 answers
49 views

I currently have been trying to use WebContainers + emscripten for my compilation, and i want to know if it is possible, and if not other ways to do it. hello.js import { WebContainer } from 'https://...
ARGHHHHHH's user avatar