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

by frek
Casts
 
In this code-snipped class B { public: virtual void Test(){} }; class D : public B { void Test()...
[2 replies] Last: One should also ask if the use of a cast is necessary: it may not be, ... (by TheIdeasMan)
by Cplusc
map
 
hello I have two vectors, a {1,4,8,3,6,9} and b{ 0,1,2,3,4,5}. For accessing the 5th element inside...
[4 replies] Last: Thanks for your answer. Actually I thought about this as well, but I'm... (by Cplusc)
by frek
Pointers to classes and casts
 
Here: class B { public: virtual void Test(){} }; class D : public B {}; void f(B* pb) { D* ...
[12 replies] Last: Thank you. I try to form a new thread for the latter question to get t... (by frek)
Help with multi dimensional arrays!
 
Hello! Could come help me get started with this program? Write a program using a multi-dimensiona...
[4 replies] Last: I have been trying to start this assignment for a bit, and just cant ... (by seeplus)
encrypt and decrypt pointer
 
Hello , How to encrypt and decrypt pointer [ 99DE27 ] And save the result in ini file
[18 replies] Last: Thank you all for your help Thank you Ganado (by Hawlong)
by frek
Get started learning Embedded programming in C++
 
Gus, I have a general question about embedded. I'm a C++ programmer and would like to start learning...
[1 reply] : While I haven't toyed with arduino or anything smaller than a raspi, I... (by newbieg)
Can Someone Help Me Find Error in This Program?
 
<edit>OP deleted their post and ran away. USAFrenzy rescued the mess and it's posted below in messa...
[9 replies] Last: I'm impressed that you found it. Thanks. I chose a distinctive look... (by mbozzi)
Can someone explain me this unexpected output?
 
I was trying to handle different line-ending. But as I expected the output was different than expec...
[3 replies] Last: You could evaluate this at compile time without "macro-fying" things b... (by USAFrenzy)
How to read file having different line ending in Cpp
 
I have two files "linuxUTF8.srt" and "macANSI.srt". I am reading these files using getline(). as mac...
[5 replies] Last: Read the whole file into a string. Then find the first occurrence in t... (by seeplus)
how convert GDIplus::color to colorref?
 
how convert GDIplus::color to colorref? point Point=PixelLine ; Color *color; ...
[2 replies] Last: thank you so much for all.. works fine (by Cambalinho)
string handling
 
I am trying to resolve the below string manipulation. But code doesn't work as expected. Need help w...
[8 replies] Last: Right! I don’t know what I was thinking – I was probably already s... (by Enoizat)
How to capture the screen of a window that contains transparency?
 
Cross-posted https://docs.microsoft.com/en-us/answers/questions/702376/how-to-capture-the-screen-of-...
[1 reply] : Also asked and answer given at https://forums.codeguru.com/showthread.... (by seeplus)
GDIPLUS: using Graphics, can i get HDC?
 
using Graphics, can i get HDC?
[15 replies] Last: Yes, I would think that BitBlt(...) is only reliable within the paint ... (by coder777)
Issues regarding Menu
 
Hello, I have to make a menu, 1. compress Text that will give allow you to input a value that will a...
[12 replies] Last: what I would do is get a statistical breakdown of english and assign t... (by jonnin)
by frek
General rule on inheritance
 
Will you please explain this general rule: “a D is a B” does not imply “a Container<D> is a C...
[12 replies] Last: Thanks for your time. patience, and help. :) (by frek)
temporary objects get destroyed and corrupt program
 
I believe the following code has a bug related to temporary objects getting destroyed leaving dangli...
[4 replies] Last: That's it!! Not quite. Having references as member variables are alwa... (by coder777)
iterating over a static std::vector
 
So I have a static std::vector like this: static std::vector<ApiWrapper> api_handlers = { Rtl:...
[8 replies] Last: Could be SIOF https://en.cppreference.com/w/cpp/language/siof (by mbozzi)
Assignment operator bottlenecking simulation
 
I am running a Monte Carlo simulation of a polymer. The entire configuration of the current state of...
[15 replies] Last: maybe instead of G = std::move(G_), the easiest thing to do might be ... (by seeplus)
by frek
Change C code to C++ in an embedded project
 
The following C code is in the main.c file of an embedded project on STM32CubeIDE. /* USER COD...
[9 replies] Last: Thank you very much salem c . Your remark is right and worked. First... (by frek)
For Loops in an Array Comprehension Help
 
Hi guys, I encountered this problem while I was tackling loops in an array. Can someone help me by e...
[1 reply] : So without the 2nd a++ at line 21, you do understand why you see 1 ... (by salem c)
January 2022 Pages: 1234
  Archived months: [dec2021] [feb2022]

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