Beginners - February 2023 (Page 2)

[Dynamic Polymorphism/object slicing] Overriden functions in derived classes not called
 
This code simulates a random dice roll. A Dice object stores an arbitrary number of DieFace (a gen...
[4 replies] Last: [quote=mbozzi] The problem in that case was inside BigBox::getFoo, whi... (by ElusiveTau)
by jNc
How to input multiple lines code to terminal to pass to C++ variable
 
Need to few lines of code to C++ with terminal Text Text text How to proceed?
[7 replies] Last: Not Qt, but it works fine. You display output in the terminal - and in... (by Geckoo)
by jNc
How to delete dynamically allocated object if Out of Scope
 
Assume, Object 1 function 1 calls Object 2 function which return value, value is dynamically alloca...
[11 replies] Last: In general, the subsystem which performs allocation of a resource shou... (by JLBorges)
by jNc
How to return array of doubles? (1,2)
 
#include <iostream> using namespace std; double *f(); int main() { double *ptrTo...
[20 replies] Last: > The reasons given for it are just arm waving to support a preference... (by JLBorges)
by frek
Raw and smart pointers
 
int* foo(int n) { return new int(n * 2); } int main() { std::cout << *foo(12); } Here we've a...
[6 replies] Last: [quote=mbozzi]The compiler could evaluate new int and g() before const... (by Ganado)
AssertNonvoid function
 
Hi folks. I am working with spi drivers example in C language. in this path: https://github.com/...
[1 reply] : its a debugging function to tell you the file and line number where th... (by jonnin)
by Geckoo
Leave Handle after CIN
 
My question is so stupid that it's a shame to post it here :) I have a console application which la...
[1 reply] : Finally I found a solution according to my previous attempt using : Se... (by Geckoo)
Is it possible to delay base class ctor call in member initializer list?
 
#include <iostream> struct Sample { int x = 0; Sample() {} Sample(int value1) : x(va...
[3 replies] Last: [quote=Peter87]This might be necessary if you need to do calculations ... (by ElusiveTau)
by jNc
how to pass some data to string
 
Assume, I need to pass some data to buffer for future copy to terminal or so on. How can I proceed?...
[5 replies] Last: [quote=George P]The WinAPI virtual key codes are #defines, they are re... (by Peter87)
Span Vs Vector
 
I occasionally tune into "C++ Weekly" on Youtube, and this is today's video: https://www.youtube.com...
[9 replies] Last: A generated html version of the current working draft: http://eel.is/c... (by JLBorges)
February 2023 Pages: 12
  Archived months: [jan2023] [mar2023]

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