Category "c++"

normalize histogram in c++ - function normalize in openCV

I need to normalize the histogram of an image f which mean to applicated an transformation of histogram from image in order to extend the range of value of f to

Use macro definitions (e.g. M_PI) in math.h as float not double

I noticed that all the mathematical constants are declared as double, which leads to conversion problems on some platforms where no double precision units exist

Struggling with libssh on Windows

The problem I'm trying to build a project in Visual Studio 2015 on Win10 that makes use of libssh, but I'm having no luck getting it to work. I feel like I'm l

Windows Open Dialog Box hangs forever with Address Sanitizer enabled

When Address Sanitizer is enabled, the Open Dialog Box cannot be shown. It hangs forever. Thank you. It hangs when running hr = pFileOpen->Show(N

IDE Font spacing problems

A couple months ago, the font I was using in the NetBeans IDE suddenly had huge spaces between each letter, making it almost unreadable. (I was using the Papyru

Can I launch a cooperative kernel without passing an array of pointers?

The CUDA runtime API allows us to launch kernels using the variable-number-of-arguments triple-chevron syntax: my_kernel<<<grid_dims, block_dims, shar

Libwesockets.h: Issue with lws_write: C++ string to C conversion and send

I'm using g++. Code: std::string str = "{\"action\":3,\"data\":{\"account\":\"somehashgoeshear\",\"someint\":0,\"id\":1,\"moreint\":0,\"name\":\"demo\

Measuring bandwidth on a ccNUMA system

I'm attempting to benchmark the memory bandwidth on a ccNUMA system with 2x Intel(R) Xeon(R) Platinum 8168: 24 cores @ 2.70 GHz, L1 cache 32 kB, L2 cache 1 MB a

cannot convert int (*(int))(int) to int (*(int))(int)

i'm trying to learn about function that returning a pointer to a function, after i tried to compile the code, it gives me this kind of error: cannot convert

Unable to use std::apply on user-defined types

While implementing a compressed_tuple class for some project I'm working on, I ran into the following issue: I can't seem to pass instances of this type to std:

OpenMP-behavior: Using ICC and GCC gives significantly different run times

For a small benchmark of OpenMP on an i7-6700K I wrote the following code: #include <iostream> #include <omp.h> #include <vector> #include <

uint16_t array to string and back c++

I have a uint16_t array and I want to be able to convert it to a string and convert it back. The goal is to save the array with this library and load it back in

Why Input/Output Error occurs when use ls command in my fuse filesystem?

Why I/O Error causes when I tried ls . command in my fuse filesystem? My filesystem has a limitation that it only allows mail address type as individual filenam

Why do std::stof, std::stod, and std::stold handle errors with exceptions?

What is the rationale for why std::stof, std::stod, and std::stold throw exceptions? http://en.cppreference.com/w/cpp/string/basic_string/stof Input errors are

How to generate .pdb file in Visual Studio 2019 for C++ from command line

I am using cl.exe C++ compiler in Visual Studio 2019 from the command line. But, I am unable to set the required flag to produce a .pdb file to debug in a separ

GL Error 1280 when enabling depth test

I'm having some problems with an opengl application I'm writing. GLenum err = 0; glEnable( GL_DEPTH_TEST ); err = glGetError(); if ( err != GL_NO_ERROR ) p

clang: What does emitting mean?

The clang diagnostics reference uses the word emit three times. The following warnings use this term. Example 1: Compile this with -Wunneeded-internal-declarati

Valgrind shows question marks

I have compiled a program using Code::Blocks. I have turned on "produce debugging symbols" under the "Debug" target, and also turned off "strip all symbols..."

Warning: function 'F' is not needed and will not be emitted

Here is a little program (live on godbolt): static void UnusedDeclaration(); static void UnusedDefinition() {} static void Declaration(); decltype(Declaration(

print fibo big numbers in c++ or c language

I write this code for show fibonacci series using recursion.But It not show correctly for n>43 (ex: for n=100 show:-980107325). #include<stdio.h> #in