Category "c++"

Enablin vsync in qt

I'm making an application in c++ and Qt. I'd like to know if the settings below are enough to have vsync enabled automatically by Windows for qt application. ev

How do you set compile flags in CMake?

I'm writing a project using the Slate linear algebra library in C++, with MKL, MPI and OpenMP as dependencies. Usually, I run my program on a Linux based system

C++ : How to create a copy constructor of array that has a pointer?

I have template <class T> class arrList: public linearList<T> { public: arrList() {} arrList(const arrList<T>& List); ~

Non contiguous array pointer traversing issue in pybind11?

Please does anyone have any idea why when I pass my 2 dim Numpy float64 (Double) array normally it prints row by row correctly, col1, col2, col3, col4 as I trav

using #if to run a function

I'm trying to run the expression _setmode only if I'm using Windows, and setlocale only if I'm using Linux, but I can't manage to make them work with a simple i

Why does CMake default to Program Files x86 when compiling 64 bit program?

I am trying to build and install a basic program with CMake 3.17.2 for 64 bit windows with Visual Studio 16 2019. CMakeLists.txt: cmake_minimum_required(VERSION

Provide run time environment variable path (e.g. LD_LIBRARY_PATH) to third party dependency in bazel

In the code base I am working with we use the oracle instant client library as a third party dependency in Bazel as follows: cc_library( name = "instant_cli

Is there some agreement about memory allocation?

class http_client { public: void init(const char url*); void download(); } int main() { http_client c1; { char url[] = "www.example.com

Expand variadic template template parameters for use in e.g. std::variant<T...>

This will be a hard nut to crack. I don't even know if it's possible. My goal is to create a receive function that listens to multiple queues and pastes the obj

Can std::ranges be used with std::list

I note that many algorithms can be used with ranges allowing the use of members of custom types, rather than needing lambda functions. So, am curious whether st

create shared library with main to call undefined function and provide function body in other project

I need to create a shared library using cmake, and I must call function run() in a library function. But the project which uses this library should provide the

Question about exception guarantees for custom operator=

I have a class used to work with disk data consisting of an enum class and vector<char> sized based on the enum. The enum is an invariant for each object

CLBlast library not working on Mingw-w64 with Nvidia GPUs

I am trying to run the example samples/sgemm.cpp from the CLBlast repo on Windows 10 with a Nvidia graphics card. I have obtained the cl.hpp from the link. The

orocos ros integration, createStream causes execution to stuck in a loop

I'm integrating orocos with ros, basically i created a component that read data from some input ports and write on output ports that create streams, because i w

Qt missing OpenSSL 3.x support on Ubuntu 22.04

I tried to build my application which uses QNetworkManager to communicate to a server. I did not have any problems on older Linux versions but with the newest U

How do I get rid of the default macOS menu items in wxWidgets?

"Toggle Sidebar" is the only item I have added, how do I remove the other items which I don't really need? I'm stuck I'm on macOS 12.2 with wxWidgets v3.1.5 her

Can g++ (gcc) 11 be used on Debian Bullseye?

Can g++ (gcc) 11.1 be used on Debian Bullseye? Debian 11 (bullseye) is soon to be released, and I am interested in a compiler with C++20 and modules support. De

Interface and implementation decoupling

I'm working on an cross-platform embedded project and I don't want to use abstract classes and virtual tables to separate interface from implementation. I disco

Mount a CIFS client/connection with sys/mount

I am trying to make a CIFS connection between my Ubuntu client desktop and my Windows 10 server Desktop, so I can share folders and files though a local network

How to find the amount of numbers, lowercase and uppercase letters from a file?

I am attempting to write a program that counts the amount of lowercase letters, uppercase letters and numbers from a .txt file but I am running into some issues