The following code prints the two odd occuring numbers in an array: #include <iostream> using namespace std; int main(){ int n; cin>>n; int
I'm trying to create a Linear Probing program. So far, I'm stuck trying to create an insertElement function. The idea is that as key values are being inserted i
#include<bits/stdc++.h> using namespace std; // Printing a matrix in spiral Order int main() { int n, m; cin>>n>>m; int arr[n][
I would like to create a struct which contains both an int and an array of int. So I define it like struct my_struct { int N ; int arr[30] ; int arr[30][30] ; }
I have an issue with emplace and try_emplace as they always use the copy constructors when moving an object in. #include <iostream> #include <unordered
I trying to render a special image which is just a bunch of pixels with no format. It is a sort of a raw image with 42x 42 pixels. The images are palettes so I
I am a newbie to c++ and the IDE I am using is Visual Studio '22. I have written a code to detect a face (eyes and mouth too) and save the roi to a folder on th
C++11 mandates that static variables inside a function are atomically initialized for the first run of the function. The only way to do that efficiently is doub
I writing application using c++ and Qt. I have a problem with building application. I get many error but everything refers to static variable and undefined func
Long story short, I have a pointer to a value that is stored inverted, so when we are calculating a hash to verify data integrety, we need to invert the data th
I just wanted to make a little program to sort blocks using selection sort, but it doesn't sort itself. Blocks just keep switching places in some pattern, until
I am trying to replace libtiff into WIC (since libtiff is not able to pass Black Duck Analysis tool anymore) I have used their example https://docs.microsoft.co
I'm trying to combine two sinks: auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>(); console_sink->set_level(spdlog::l
classObject and vector within it. I made a vector of classObject and function that searches classObject with a given int id. Wanted to search certain classObjec
I have this error when I try to open some students' assignments in Visual Studio 2019, stating that nuget can't restore a package. I'm concerned about the direc
I'm trying to get the value of a template class. To get the value of a class, I can easily do like: int get_value() { return *this; } But I want to create
In a program that uses DirectX to render a 3D component I use a dedicated rendering thread that apparently gets created if I call DispatcherQueueController::Cre
I want to learn to create DLLs in c++ and use them in python to increase the speed of calculations. To begin with, I tried to create a simple C++ dll and load
For some reason in C++, the expressions if(!(n & 1)) and if(n & 1 == 0) seem to not be equivalent. Can someone please explain why this happens?
If there is a difference between two constructs I would like to know std::string name = std::string("Eugene"); and std::string name = "Eugene";