General C++ Programming - August 2022

by PeteDD
overloading class method in virtual class situation
 
I am having difficulty overloading a class method.... I am programming a data collection system. I have an interface class, a base class, and then inherite...
[18 replies] Last: Thanks again. I needed to just adjust some of my platformio.ini setti... (by PeteDD)
does c++ getline reads empty line as \n?
 
I realized when there are many blank line inside a txt file and I use getline inside a file with many blank line it will read the blank line into the string. ...
[7 replies] Last: There is also istream::getline() which is a member function for istrea... (by seeplus)
C++20's std::format is so picky
 
Well, Visual Studio 2022's implementation of std::format is picky. The following compiles without even a twitch: import <iostream>; import <format>; in...
[18 replies] Last: Heh, the C++20 One Ranges Proposal (P0896R4) has a rather amusing prea... (by deleted account xyzzy)
python to c++ converter
 
I am looking for python to c++ converters. Any free tools available?
[18 replies] Last: Having written numerous translators, I would suggest that C is a bette... (by AbstractionAnon)
Detect the "order" (arrangement) of an array
 
Suppose you have an array of length n , containing some "random" numbers. There are n! possible orders in which these numbers can be arranged. For example, i...
[6 replies] Last: Actually, @kigar64551, I've just realised that my approach is essentia... (by lastchance)
c++ api32 dispplayDialog
 
hallo, C++(ers) I have a problem after making the main int window. the I wane whit a pus of a a button display a other window but is don't show up. LRESULT ...
[3 replies] Last: is ok now the window Class name was not Correctly spelled h... (by nvthielen)
Error using large Eigen matrix: " OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG"
 
I have been using Eigen matrices to test a new code I wrote, and I just ran into this issue for the first time. I just started reading about "Fixed vs. Dynamic ...
[5 replies] Last: Thanks everyone!! Using Matrix<double,Dynamic,Dynamic> X(ny+1,nx); o... (by JamieAl)
concept : yielding function pointer by using the plus trick
 
Hi, I have this code /** * Constraints a deleter to be or to yield a function pointer. */ template<typename D> conc...
[8 replies] Last: https://developercommunity.visualstudio.com/t/Internal-compiler-error:... (by JUANDENT)
Visual Studio 2022 Issue
 
When I try to create a new project, Visual Studio is picking up a totally unrelated source directory. 1. Create New Project 2. Select empty console projec...
[5 replies] Last: @ElusiveTau: OLDPROJ was NOT a member of the solution. Yes, I got the ... (by AbstractionAnon)
tree reversal
 
I am trying to write a recursive function that reverse the actual tree by modifying it rather than creating another one. Below is my code so far. Below is e...
[9 replies] Last: Thanks a lot seeplus. This thread is solved and I am closing it. Thank... (by denver2020)
how does argument get passed to function name
 
#include <iostream> #include <array> #include <algorithm> #include <iterator> using namespace std; void timesTwo(int i) { cout << i * 2 << " "; } int ...
[13 replies] Last: very clear explanation. thank you (by Worldtreeboy)
by t im
About the constructor function.
 
Just take std::vector as an example. I wonder which constructor function is called when executing std::vector<int> a{1,2,3}. Thanks for your help.
[4 replies] Last: Thanks for all answers. I have got it. (by t im)
by ruzip
Convert Pointer &p to Integer and Back
 
What is a valid conversion from pointer (&p) to integer and back? Do I just do a cast? or just the same as Int to Pointer and use the & when needed?
[9 replies] Last: C99: If the implementation provides intptr_t and/or uintptr_t , the... (by JLBorges)
by frek
Array exercise
 
The exercise says: A non-empty array A consisting of N integers is given. A triplet (X, Y, Z), such that 0 ≤ X < Y < Z < N, is called a double slice. The sum...
[7 replies] Last: @frek, The easiest way to generate tests for your algorithm in this in... (by lastchance)
Internal memory reading
 
I am trying to get the health of the player, and i have address (green address) and Offset , How can read this address? (Internal = dll inject) .
[4 replies] Last: I believe the aim is to create a handler in a DLL, then attach it to t... (by kbw)
isalpha() skips a non-alphabetic character if there is no space in front of it.
 
Hey guys. I'm making a simple SQLite compiler via C/C++ and all is going well, except for the isalpha() function. How the keyword tokenizer works, is that it...
[15 replies] Last: else if(isalpha( this->c )) { this->temp.clear(); ... (by dhayden)
Error Eigen: THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS
 
I have an iterative solver that works fine in a main script and when I move it to a function things run fine until it hits a specific line where I get the error...
[3 replies] Last: @helios I would guess it's because the type of L and the type of di... (by JamieAl)
Writing data to random access file
 
If a random access file is 3000 byte and i use the ostream seekp function to place the file position pointer at the 500th byte and then use ostream write func...
[6 replies] Last: Yes - I'd just read the whole file into a std::string, manipulate as r... (by seeplus)
Having problems on the output
 
Hello, I have this code but I am having problem with the output as it keeps getting out of the grid order and is not outputting all the words. #include <iostre...
[3 replies] Last: And to finish it off with assigning random chars to to unused elements... (by seeplus)
C++: how avoid draw outside the view?
 
here my code for draw a polygon: position GetLineZZero(position Origin, position Destination) { position LinePoint; RECT fd; GetClientRect(Get...
[1 reply] : what is the actual value? Your logic is coded so it will fail the con... (by jonnin)
August 2022 Pages: 123
  Archived months: [jul2022] [sep2022]

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