
please wait
by frek
Casts
|
In this code-snipped class B { public: virtual void Test(){} }; class D : public B { void Test(); void print(std:: string st) { std::cout<<st<<'\n; }; void ... |
Jan 25, 2022 at 5:02am
[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 vector a, instead of a I want to use b which corresponds ... |
Jan 24, 2022 at 11:29pm
[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* pd1 = dynamic_cast<D*>(pb); D* pd2 = static_cast<D*>(pb);... |
Jan 24, 2022 at 6:44pm
[12 replies] Last: Thank you. I try to form a new thread for the latter question to get t... (by frek)
|
by azalien
Help with multi dimensional arrays!
|
Hello! Could come help me get started with this program? Write a program using a multi-dimensional array that allows the user to enter payroll data for a bus... |
Jan 23, 2022 at 11:15am
[4 replies] Last: I have been trying to start this assignment for a bit, and just cant ... (by seeplus)
|
by Hawlong
encrypt and decrypt pointer
|
Hello , How to encrypt and decrypt pointer [ 99DE27 ] And save the result in ini file |
Jan 22, 2022 at 6:45pm
[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 embedded programming using C++. I've searched much to find ... |
Jan 22, 2022 at 7:23am
[1 reply] : While I haven't toyed with arduino or anything smaller than a raspi, I... (by newbieg)
|
by salem c
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 message https://www.cplusplus.com/forum/general/281826/#msg121957... |
Jan 22, 2022 at 2:16am
[9 replies] Last: I'm impressed that you found it. Thanks. I chose a distinctive look... (by mbozzi)
|
by Shubham2000
Can someone explain me this unexpected output?
|
I was trying to handle different line-ending. But as I expected the output was different than expected. test4utf8mac.srt is a subtitle file of SubRip format h... |
Jan 21, 2022 at 9:37pm
[3 replies] Last: You could evaluate this at compile time without "macro-fying" things b... (by USAFrenzy)
|
by Shubham2000
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 macANSI.srt has '\r' as line ending I am reading the whole file... |
Jan 21, 2022 at 1:13pm
[5 replies] Last: Read the whole file into a string. Then find the first occurrence in t... (by seeplus)
|
by Cambalinho
how convert GDIplus::color to colorref?
|
how convert GDIplus::color to colorref? point Point=PixelLine ; Color *color; img->GetPixel(PosY,PosX,color); ... |
Jan 20, 2022 at 9:24pm
[2 replies] Last: thank you so much for all.. works fine (by Cambalinho)
|
by leo2008
string handling
|
I am trying to resolve the below string manipulation. But code doesn't work as expected. Need help with some inputs. Input First line of input contains string... |
Jan 20, 2022 at 7:08pm
[8 replies] Last: Right! I don’t know what I was thinking – I was probably already s... (by Enoizat)
|
by salem c
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-a-window-that-contain.html https://stackoverflow.com/questio... |
Jan 20, 2022 at 11:55am
[1 reply] : Also asked and answer given at https://forums.codeguru.com/showthread.... (by seeplus)
|
by Cambalinho
GDIPLUS: using Graphics, can i get HDC?
|
using Graphics, can i get HDC? |
Jan 20, 2022 at 9:03am
[15 replies] Last: Yes, I would think that BitBlt(...) is only reliable within the paint ... (by coder777)
|
by Ocelotter
Issues regarding Menu
|
Hello, I have to make a menu, 1. compress Text that will give allow you to input a value that will appear in 2. Extract Text. The problem is that it outputs th... |
Jan 19, 2022 at 7:52pm
[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 Container<B>” with some simple example to be easily unders... |
Jan 19, 2022 at 2:29pm
[12 replies] Last: Thanks for your time. patience, and help. :) (by frek)
|
by JUANDENT
temporary objects get destroyed and corrupt program
|
I believe the following code has a bug related to temporary objects getting destroyed leaving dangling references... however I don't know how to find this in th... |
Jan 19, 2022 at 7:03am
[4 replies] Last: That's it!! Not quite. Having references as member variables are alwa... (by coder777)
|
by hello128882
iterating over a static std::vector
|
So I have a static std::vector like this: static std::vector<ApiWrapper> api_handlers = { Rtl::RtlDuplicateUnicodeString, Rtl::RtlInitUnicodeString, ... |
Jan 18, 2022 at 5:23pm
[8 replies] Last: Could be SIOF https://en.cppreference.com/w/cpp/language/siof (by mbozzi)
|
by mencecpp
Assignment operator bottlenecking simulation
|
I am running a Monte Carlo simulation of a polymer. The entire configuration of the current state of the system is given by the object called Grid . This is my... |
Jan 18, 2022 at 9:49am
[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 CODE END Header */ /* Includes --------------------------------... |
Jan 18, 2022 at 9:31am
[9 replies] Last: Thank you very much salem c . Your remark is right and worked. First... (by frek)
|
by ForgottenLaw
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 explaining to me how do I get the number 1 in the output? Bec... |
Jan 18, 2022 at 8:07am
[1 reply] : So without the 2nd a++ at line 21, you do understand why you see 1 ... (by salem c)
|