皇冠hg0088代理网址

Questions tagged [c++]

C++ is a general-purpose programming language. It was originally designed as an extension to C and has a similar syntax, but it is now a completely different language. Use this tag for questions about code (to be) compiled with a C++ compiler. Use a version-specific tag for questions related to a specific standard revision [C++11], [C++14], [C++17] or [C++20], etc.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

How to cast from `std::vector<uint8_t>` to `std::vector<int8_t>`?

I need to fill data into SetByteArrayRegion: void JNIEnv::SetByteArrayRegion(jbyteArray array, jsize start, jsize len, const jbyte *buf) where jbyte is simply int8_t. I have a vector of uint8_t. Why ...
0
votes
0answers
10 views

Local variable to global variable

I'm very new to C++ so sorry if I'm making a really stupid mistake. I'm using JsonCPP to try read my config file and I wanted to store them in a global variable, but I can't seem to work out how to do ...
1
vote
1answer
16 views

C# file which defines enums for both C# and C++

I have the following code in cs file (compiled in Visual Srudio) #if __cplusplus // C++ region, hide the private C# key word "private" from C++ #define private namespace fastmapping { #else /...
0
votes
0answers
6 views

VsCode, C++ - clang: error: linker command failed with exit code 1 (use -v to see invocation) [duplicate]

I am trying to run the following c++ files but I am getting a couple of errors when compiling. I am using VSCode on MacOS, and tried to search around but I am still stuck and don't know what the ...
0
votes
2answers
18 views

Getting loop to redisplay message c++

I am trying to get a program to display a menu with options, then given the user input, display a certain message. After it displays their message I want the loop to go back to displaying the message ...
0
votes
0answers
4 views

Error playing video when using opencv c ++ on a Visual Studio platform

I tried to get it running, but it didn't do anything, didn't show up errors and automatically terminated the program. #include"opencv2/core/core.hpp" #include"opencv2/highgui/highgui....
0
votes
0answers
4 views

How i can handle errors in function on LuaBind?

Well, i'm trying to use callbacks in .lua file that contain the function onPlayerConnect(playerId). I use the function luabind::call_function<void>("onPlayerConnect", playerId); to lua ...
-3
votes
1answer
17 views

How can I unify to arrays into a third new array of strings? [closed]

This is my code i have tried but i dont understand the error that says "expected primary-expresion before']' token in line 10 and in line 11" #include <iostream>\ #include <vector&...
-4
votes
0answers
20 views

Why is this not the correct way to create an array of a struct I made? [closed]

I am receiving an error saying app_main.cpp:48:1: error: ‘sectors’ does not name a type 48 | sectors[0].CenterX = -0.6666; | ^~~~~~~ app_main.cpp:49:1: error: ‘sectors’ does not name a type ...
-1
votes
0answers
9 views

C++ Complex Symmetrix Sparse eigenvalue solver [closed]

I am interested in a few smallest eigenvalues of a huge complex double symmetric matrix (10M*10M), which is considerably sparse. Currently, I am using the "arma::eigs_gen()" solver and I was ...
-2
votes
0answers
21 views

missing operator = corresponding operands

class Matrix { int arr[2][2]; public: void input(vector<vector<int> >& A); void display(); void operator+(Matrix x); void operator-(Matrix x); void operator*...
-3
votes
0answers
21 views

My code is showing my numbers in scientific notation or they're using pointers, i don't know [closed]

The title says it all really. I don't really know what to try, someone please help me soon, it's due 2 days from now. We started working with arrays in functions and I'm sure it has something to do ...
2
votes
1answer
18 views

Need a notification that DLL is shutting down before getting DLL_PROCESS_DETACH

We have a DLL built in Visual Studio using C++11. Our DLL has a fixed API at this point, and it includes an open and close function (among others). We allow our users to open and close multiple ...
1
vote
2answers
58 views

If I treat my C code like C++ code, will it run like normal? [duplicate]

It's what I believe to be a very simple question. Context: I'm following a tutorial that allows me to run C++ code in Visual Studio Code, but I'm trying to run C code, not C++ code. The program I'm ...
0
votes
0answers
10 views

Equivalent of 1D numpy.interp in C++ Cuda (Lerp in CUDA)

I have two vectors 'xp' and 'fp' which correspond to the x and y values respectively of the data. A third vector 'x' which is the x coordinates at which I would like to evaluate the interpolated ...

15 30 50 per page
1
2 3 4 5
46187