General C++ Programming - April 2022 (Page 2)

by t im
quertion about std::sort cmp function
 
When I define a vector<int> contains one hundred 0s and sort with the code below, an exception "inva...
[2 replies] Last: Thanks a lot. Your answer really benefits me. (by t im)
by Cplusc
Installing Trilinos on windows
 
I am trying to include Trilinos in my project and I understood prior to that I need clapack library....
[3 replies] Last: did the compiled lapack work at least? one at a time... first you ha... (by jonnin)
by frek
Compile time evaluation and performance
 
Hi all, In this piece of code: #include <iostream> constexpr double nth(double x, int n) // assu...
[9 replies] Last: What is the benefit of constexpr? It provides a way to reliably ... (by mbozzi)
char array manipulation
 
Can anyone tell me what is wrong in this code and how to fix it? here bytearray gets destroyed as i...
[11 replies] Last: Thanks all for your valuable inputs here. Closing this thread now. (by leo2008)
AlphaBlend() can make 1 color transparent too?
 
using the AlphaBlend() can make 1 color transparent too? what i mean is make a color transparent(li...
[4 replies] Last: after several tests, i notice these: 1 - zero will be Alpha Transparen... (by Cambalinho)
7 segment displays (1,2)
 
My program is supposed to prompt the program user to enter text to be displayed on our 7-segment dis...
[20 replies] Last: everything works perfectly, thanks for your help! (by PopSmoke)
by tonic
c++ Client/server
 
Hello dear cpp members I had a questions, I used to work with c# (background workers) async/await t...
[1 reply] : you probably need to thread at least some of that. screen share is in... (by jonnin)
expected primary-expression before ‘]’ token myArray <int> obj(arg1[], size); Confused as to why this is happening
 
The code is supposed to print out the highest value in an array The error is also occurring in my c...
[4 replies] Last: Maybe something like: #include <iostream> #include <algorithm> te... (by seeplus)
Unknown debugging errors
 
I've been working on this project for a class for several weeks now with help from my teacher and we...
[8 replies] Last: Really weird echoing now that the OP has decided to cut and run. At t... (by deleted account xyzzy)
Comparing all characters within two strings of different length (1,2)
 
let's say I have two strings: str1: aaabcabaaaba str2: bca I would like to slide str2 over s...
[20 replies] Last: PS. I submit exhibit 1 - the new, 'improved' camel... https://en.wiki... (by seeplus)
by frek
Genomic Range Query
 
A DNA sequence can be represented as a string consisting of the letters A, C, G and T, which corres...
[14 replies] Last: Assessing what was already written using paper and pen it turned out t... (by frek)
by ManaG
int was not declared in another function
 
#include <iostream> #include <fstream> using namespace std; struct stac { int r, g, b; ...
[3 replies] Last: Thank you, also I will use them next time, I haven't thought about it ... (by ManaG)
by Cplusc
Calling a constructor in a loop
 
I have a constructor which take 3 arguments including 3 vector of vector of type double and one vect...
[14 replies] Last: I fixed it. The problem was an & missing somewhere in the code. Thank ... (by Cplusc)
by mnm71
How to find peak in c++
 
In this code, I calculate the number of peaks and check the result with the Findpeaks Matlab functio...
[5 replies] Last: Or with a state machine: #include <iostream> #include <vector> using... (by lastchance)
using StretchDIBits() can i draw transparent and semitransparent?
 
using StretchDIBits() function, can i draw it without a color(backcolor transparent) and semi-transp...
[11 replies] Last: theres so many code.. but i choose the used class Bitmap functions: v... (by Cambalinho)
ENVIAR DATOS POR PUERTO SERIE.
 
Buenas a todos, estoy necesitando hacer un ejecutable win32 donde pueda pedir un numero de puerto pa...
[3 replies] Last: it is important to decide if a number is in binary or text form. If in... (by jonnin)
formula to get nearest number (1,2)
 
Hey everyone, I'm creating a midi program to alter incoming midi and putting out the altered midi...
[20 replies] Last: off course that was it, tx! (by wimvandenborre)
Getting proper calculations to work?
 
I am trying to have my program calculate the min, max, total, average, etc, of Hawks. But it keeps g...
[3 replies] Last: As a possible first refactor, consider: #include <iostream> #includ... (by seeplus)
Cin function wont work?
 
I am trying to get my cin function to work with this program, and it was working before, but now aft...
[7 replies] Last: I have been building up this code based on a template and help from ot... (by Blueshark1)
April 2022 Pages: 1234
  Archived months: [mar2022] [may2022]

This is an archived page. To post a new message, go to the current page.