General C++ Programming - August 2022 (Page 3)

Error: cannot convert ‘const Scalar*’ {aka ‘const double*’} to ‘const std::complex<double>*’
I am trying to solve for a linear system of equations x = A\b and I am using the following expression in Eigen: x = A.colPivHouseholderQr().solve(b); ...
Aug 7, 2022 at 10:26pm
[3 replies] Last: Thanks for the help. I was wondering what is the difference b/w rei... (by JamieAl)
Addmenus
Hello, Cplusplus. I have a problem when I Append the Menu Item a get an error the argument of type const char" is incompatible with parameter of type "...
Aug 7, 2022 at 7:28pm
[4 replies] Last: sold the puzel, void AddMenus(HWND hwnd) { HMENU hMenu = Crea... (by nvthielen)
Write object into file
Hello guys, i am working on a simple password manager and i want to write multiple struct Credential objects into a bin file. #include <stdio.h> #include <s...
Aug 7, 2022 at 1:39pm
[6 replies] Last: Thanks, thats good to know ive already thought that too. I dont suppos... (by LukeProducts)
by ruzip
Detect Num Lock key press/up and other special keys in GLUT/FREEGLUT
I can't seem to find any documentation on how to detect other special keys like Num Lock, Scroll Lock, Pause, PrintScreen when they are hit/key up in Glut/FreeG...
Aug 7, 2022 at 4:13am
[7 replies] Last: Thanks guys for the additional info. The workaround you mentioned ne... (by ruzip)
Shift words
Hi if I have a 2d array , how can I shift either left or right, for example: xhellofreind xxxhellofriend
Aug 7, 2022 at 1:50am
[4 replies] Last: 2d is still a solid block. so its fine. 2d dynamic, need to loop it ... (by jonnin)
Assignment with arrays
Hello, I need help with this assignment and I have zero ideas what to do and how to even start. Could anyone help at all. (1) Function Algorithms for Array El...
Aug 6, 2022 at 9:43am
[2 replies] Last: your own programming interface and algorithm Maybe :) : #include... (by seeplus)
How to assign 2D array with random numbers
How do I assign 2D array with random numbers. I need to display this C1 C2 C3 C4 C5 R1 2 3 4 1 6 R2 3 3 4 4 5 R3 4 ...
Aug 6, 2022 at 8:51am
[2 replies] Last: #include <iostream> #include <random> #include <utility> #include <a... (by seeplus)
Overflow while converting domain name to ip address
Hello all, ive just written a function to tell the ipv4 of any domain like f.ex "google.com", and for linux, it yust works fine. But now i shwitched to windows...
Aug 5, 2022 at 4:35pm
[3 replies] Last: As this topic is marked with a green tick, it looks like the OP has so... (by seeplus)
some function call does not require parentheses?
//Fig. 13.9: Fig13_09.cpp //Creating and testing user-defined, nonparameterized //stream manipulator #include <iostream> using namespace std; //bell manipu...
Aug 5, 2022 at 1:42pm
[6 replies] Last: if you want to circle back to the big question, there are several othe... (by jonnin)
by frek
Fish task
I have doubt if my understanding about the task is right or not since I don't get the score I want. The task says: You are given two non-empty arrays A and B...
Aug 4, 2022 at 6:36pm
[5 replies] Last: the code that I'm not going to give you Thank you for that. Only unde... (by frek)
C++ Reference to read offline?
Good evening everybody! I was wondering if there was any C++ reference that can be downloaded to read it offline? The reason why I am asking this is becau...
Aug 2, 2022 at 8:35pm
[5 replies] Last: Thanks! Like I said, I am new to this, so I did not know to look unde... (by Andre G)
why some callables require std::forward and others don't?
Hi, I am grabbing this code from cppreference.com and cannot understand why std::forward is used sometimes on the callable and sometimes it isn't... For...
Aug 2, 2022 at 6:41pm
[5 replies] Last: Essentially, although the "function" being called (the Callable ) is ... (by mbozzi)
Strncmp consumes a lot
hello everyone, I encountered a problem. When I was performing string matching, I used the strncmp function. I found through the flashgraphs that it consumed a ...
Aug 2, 2022 at 12:09pm
[6 replies] Last: comparison of strings is one of the most expensive things we do regula... (by jonnin)
by frek
Objects initialized by default
As far as I know, static or const objects are initialized by default. Is it true? And is there any other type of object which is by default initialized? PS...
Aug 2, 2022 at 5:35am
[12 replies] Last: Could you write what you've gathered, for example, on a conclusion li... (by TheIdeasMan)
by PeteDD
multiple definitions of class instances
(I can't delete this post...) but you can ignore it if you like since, as you can see from the next post, I fixed it. I have tried for several hours to figur...
Aug 1, 2022 at 6:21pm
[6 replies] Last: Brilliant Ganado! That solved a lot for me! Thanks! (by PeteDD)
Difference between virtual, redefining and overridden function?
These 3 seems the same because the derived class will have a same function that is overriden?
Aug 1, 2022 at 7:35am
[1 reply] : https://en.cppreference.com/w/cpp/language/virtual [quote=cppreferenc... (by TheIdeasMan)
August 2022 Pages: 123
  Archived months: [jul2022] [sep2022]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.