Category "c++"

How To set the size of image more than default value in OpenCV

What is the default frame size of opencv image streaming frame ? If I set Width and height of frame more than default frame size what happens? import cv2 cam

More than one file was found with OS independent path 'lib/x86/libusb.so'

I am using libusb in my android application. When I am trying to build libusb native library then I get below error message, *.so files generated. Error:Exe

tcc: error: undefined symbol '_GetConsoleWindow@0'

I'm making a program in C/C++ which must run hidden using this code: #define _WIN32_WINNT 0x0500 #include <windows.h> int main(){ HWND hWnd = GetCons

make Clang-Format ignore comments for line break

Is it possible to tell Clang-Format to ignore comments for line break operations? The idea is to follow the style "the code is well formatted, even if comments

How to generate CMakeLists.txt in Clion when I create project from existing sources?

Idk how to make it automaticly - the only option is to specify where the file is - not to generate it, but I don't wan't to write it by my own, because there ar

QtCharts module not found even after installing in Qt Maintenance

I know that there're many questions regarding this aspect: QML module not found (QtCharts) How to include the QtCharts library in Qt Creator 4.2.0 (Community) H

Expected ')' before token inline assembly error

I would like to learn some inline assembly programming, but my first cod snippet does not work. I have a string and I would like to assign the value of the stri

Visual Studio warning about copies of files with different contents

When I go to debug my C++ project in Visual Studio, up pops a little warning dialogue box that tells me: A copy of datum.h was found in c:/users/brad/desktop/s

Troubleshooting pycocotools installation

I'm trying to use object detection models from Tensorflow and need to get pycocotools installed. I'm doing this from a python (3) virtual environment on a Windo

How to use FFTW library in cmake?

I have C++ code which uses FFTW 3.3.4. Ubuntu 16.04, cmake version 3.7.2 $ locate *fftw*.so /usr/lib/libsfftw.so /usr/lib/libsfftw_mpi.so /usr/lib/libsfftw_th

Sorting an array of strings in C++

I am trying to accomplish the following task: List the students in alphabetic order, sorted by last name. Do not change the given case of the names. Do not ch

Intel c++ compiler in Xcode [duplicate]

I'm trying to use Intel c++ compiler for my Xcode project. After installation, following the tutorial from Intel, there's an Intel c++ compile

C++ check inheritance at compile time

I have a base class template<typename T> class Base {}; and a few derived classes: class DerivedInt : public Base<int> {} class DerivedDummy :

C++ union struct with struct member works on Clang and MSVC but not GCC

I am trying to define a union struct with some struct and primitive members overlapping in memory with a simple array. This works perfectly in Clang and MSVC, b

How to reset a POSIX semaphore?

Maybe I am wrong but it seems to me that the semaphore from this link is missing a reset function. Is there another way to reset its counter? I found this imp

How can I declare a structure in C++ without defining it?

I have been following a tutorial at cplusplus.com/doc/tutorial. Near the end of the Functions page, it discussed prototyping a function. Later on, I read about

Exporting class template with out-of-body definitions from DLL with MinGW-w64

I am facing trouble properly linking a trivial Windows executable to a trivial DLL with MinGW-w64 (based on GCC 11.3.0 from MSYS2) when class templates are invo

Way to handle the objects in C++

Every time when I run the code Compiler give the error of object already define and I don't know where I am making mistakes in the whole code. Even if I do th

multiple definition of `std::logic_error::logic_error(std::logic_error const&)

I am cross-compiling a windows application from my Linux host machine and I am getting a linking error of multiple definitions between two files in the std! /us

error: no viable conversion from '(lambda at A.cpp:21:22)' to 'int'

What am I missing? Lambda declaration error. Marked in comment. void solve() { int charCount, time; cin>> charCount >> time; // Generat