bst365体育投注网址大全

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
-2
votes
0answers
7 views

program logic to accept amount in INR and print the number of Jocks/Holts and Jiggles equivalent to the INR amount

There is a new currency introduced, which constitutes of three denominations: Jocks,Holts and Jiggles. 1 Jock = 27 Holts and 1 Holt is 17 Jiggles. Based on the current exchange rate, 1 INR = 2 Holts. ...
0
votes
0answers
5 views

Getting a datagrid view For linux in c++

i needing to ask if anyone out there has seen a Datagrid View in c++ for Linux.? outside of QT5 and if so point me in the correct direction. thank you so much
0
votes
0answers
8 views

Qt std::string to QString with special characters

I have Qt5 (5.7) and I'am facing a strange issue. I was unable to transform a std::string (output of a tested algorithm) to QString by following simple methods. Does anybody have an idea ? here are ...
0
votes
0answers
14 views

Discussion - Arrays vs Vector of Vectors when creating matrices - what is the most practical option?

So i have stumbled upon an exercise on an C++ book called - "Guide To Scientific Computing in C++" Here is the exercise: "Write code that dynamically allocates memory for three 2 × 2 ...
0
votes
1answer
35 views

What is the secret to the speed of the filesystem::copy function?

I am trying to reach the speed of filesystem::copy in reading the content of a file and write that content to a new file "copy operation" but I can't reach that speed. The following is a ...
0
votes
0answers
26 views

Calling template constructor in a non-template class from derived class [duplicate]

I have a non template base class having a template constructor. In the derived class I'm trying to call the base class constructor in the member initialisation list, but it fails in a compiler error. #...
-1
votes
1answer
30 views

C++ program is not running

I'm new to C++ and today i wrote today the following program: #include <iostream> using namespace std; typedef struct item { int hour; int minute; int second; void print() {...
0
votes
0answers
11 views

how to convert an ostringstream hex string character pairs to a single unit8_t equivalent binary value

I am trying to do the following: I have an assembled ostringstream object that contains a hex payload to be transmitted. Say, it might be 03125412349876543210af (this is representing the data ...
1
vote
0answers
16 views

bogus warning for constexpr if with function pointer template parameter

I always get a mysterious warning if I compile the following code: template < void(*FUNC)() > struct Bla { static void Do() { if constexpr ( FUNC != nullptr )// << compiler ...
5
votes
1answer
41 views

Overload resolution between constructors and conversion operators

I have a couple of questions related to overload resolution in C++. Consider this example: extern "C" int printf (const char*, ...); ...
0
votes
0answers
30 views

Is there a way to forbid object members declaration in inherited classes?

I need to construct a specialized object, that uses the base class constructor. This will happen in a template method, so the constructed object will be one of the specialized classes I created. Let's ...
0
votes
0answers
19 views

How to define which tiles of a topo map are intersecting with the current opengl frustum?

Currently I'm loading a huge terrain model in one time into opengl. To save graphiccard memory i would like to dynamically load single tiles, only which are currently part of the frustum. But how to I ...
0
votes
0answers
14 views

Problem linking custom libraries with VSCode [duplicate]

I am having trouble linking my libraries to the main file in vscode. I've made a simple example: main.cpp #include "io.h" int main() { int x{read_number()}; int y{read_number()}; ...
0
votes
1answer
24 views

How can I make a class method that takes a function as a parameter? [duplicate]

I want to create a method inside a class (but I think this is irrelevant) that sorts a vector according to the bool value returned by a particular function... I read that it is possible but I don't ...
-2
votes
3answers
23 views

Thresholding a sensor value [closed]

I have connected a distance sensor to an Arduino and would like to get the most accurate values for my project. My idea is to take 10 measurements, ignore both the highest and the lowest measurement ...

15 30 50 per page
1
2 3 4 5
45453