欧洲杯买球

A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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 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
8 views

How to implement a datastructure(faster than priority queue) to store and process timing events?

Using priority queue is one way but can I improve the time complexity of insertion or deletion etc.
0
votes
0answers
11 views

C++ volatile: guaranteed 32-bit accesses?

In my Linux C++ project, I have a hardware memory region mapped somewhere in the physical address space which I access using uint32_t pointers, after doing a mmap.The release build of the ...
1
vote
0answers
12 views

Unexpected behaviour with cout and incrementing

Lets say I have the following code#include <iostream>int main() { int i = 3; std::cout << ++i << " " << i++;}Since the first increment is done before, and the ...
-1
votes
0answers
13 views

C++ set<T> What is the most appropriate solution?

I couldn't get the use of Class or Struct using a C++ Set. I searched on the internet and stackoverflow, but i couldn't find a sample.Classically, it seems impossible to find samples other than int ...
0
votes
0answers
6 views

Modify Metadata during Grpc Bidirectional Streaming in C++

Using Async bidirectional streaming, can i create a client stream (ClientAsyncReaderWriter) and modify metadata value in ClientContext for each request sent on that stream? Also, on the server side, ...
1
vote
2answers
24 views

Default value as Global const vs. Function return value

In the book Programming Principles and Practice Using C++ by Bjarne Stroustrup in section 8.6.2 Global initialization, it is recommended to define default values (e.g. for date in a calendar) as ...
0
votes
0answers
20 views

-if and -of command line arguments

I have a simple question, I want to process input from a data file, which is going to be passed like this: ./myprogram -if inputfile -of outputfile however I for the life of me have no idea what ...
0
votes
0answers
10 views

C++ Multithreading with Python API Error with OpenCV

I'm using C++ with Windows MFC and the C++ Python API. In my main GUI thread, I'm importing a Python script, and then I create a CHILD thread (subclass of CWinThread) and call some Python functions ...
0
votes
1answer
25 views

Call module function in event handler callback

I wrote an Event System in C++, which is a bit useless at the moment, because all it can do is say that it handled and event. It can however emit and handle events with any payload type. The plan is ...
-1
votes
0answers
31 views

How to convert a set of rgb pixel values in a textfile to an image using C

I have converted a bmp image into rgb pixel values and copied into a text file using the following program #include <stdio.h>#include <iostream>#include <fstream>using ...
1
vote
1answer
38 views

std::visit and std::variant usage

#include <variant>#include <exception>#include <type_traits>#include <cassert>template <typename T>struct Promise { std::variant< std::monostate, ...
0
votes
1answer
32 views

String cast to const char*

I use in my project QString but In some cases I have to transfer this to an external SDK, that expect null terminated const char*. For this I use:QByteArray folderName = ((QDataItem*)(*it))->...
-1
votes
0answers
20 views

Yolo implementation using C++

I was trying to implement yolo object detection in c++ using dev c. I found the code but when i run it i got an error. I have included opencv folder in the directory where .cpp file was present but ...
0
votes
1answer
49 views

How to deduplicate a string where it only deletes consecutive duplicates

This is the code I have so far. The goal of the program is to take a string like "kcck" and delete the consecutive duplicates where it should first iterate through the string and delete cc leaving kk ...
0
votes
1answer
30 views

C++: Inner Product

In this program how's the inner_product(series1,series1+3,series2,init,minus(),divides())inner_product(series1,series1+3,series2,init,myaccumulator,myproduct)are computed ?// inner_product ...

15 30 50 per page