Beginners (Page 3)

Is interpreting sensor value safer with unsigned?
I am currently working on spi sensor that spits out 16-bit two's complement system value, since I ha...
[3 replies] Last: I have read the application details and it is signed 16-bit number in ... (by Happilicious)
How to color highlight text output in terminal (C++ and Windows)
Tried some notations, but they cover each other and look so dirty. kindly advise
[4 replies] Last: Since the OP mentioned Windows here's an older Win-centric header-only... (by George P)
by jNc
how to declare array in Constructor
Never met this task before, but how to declare array in Constructor?
[9 replies] Last: Yes. I used a struct for an example of a constructor for simplicity as... (by seeplus)
[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:
[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:
[9 replies] Last: A generated html version of the current working draft: (by JLBorges)
Pages: 123
  Archived months: [jan2023]

Cannot post in this page. To post a new message, go to the first page.