General C++ Programming - February 2023

by ruzip
C Nested Linked list using dot for members
Is it possible to have a nested linked list in C using dot operator like structs to access members...
[8 replies] Last: @Keskiverto @GeorgeP Yes something like that. I'd prefer the dot typ... (by ruzip)
remove element from vector <struct>
Hell all , Please how can remove element from this vector [parr1 ] #include <iostream> #include <...
[6 replies] Last: And should you ever need it C++20 makes it possible to reverse a range... (by George P)
by ruzip
Check if function argument is a string
How do I check if an arg extracted from va_arg inside a function is a string? My function has var...
[6 replies] Last: Thanks for the input guys. I'm not really leaning into using variadic... (by ruzip)
by ruzip
C Macro Filter String literals in arguments
Is it possible to do a parse or filter in C a macro for example: FILTER(Var, "text", somevar, foo...
[7 replies] Last: The problem is that string literals are typically treated as being sel... (by mbozzi)
implementation of simple class for raspberry pi pwm blink program (Embedded Programming) (1,2)
Hi guys, Please, could you help me with this? I have been working on this simple project to make th...
[35 replies] Last: @seeplus: Thanks! :) (by ayoesquire)
by ruzip
Macro to replace comma in #define
I'm trying to do some C macro experiment where comma "," is replaced with a keyword like ADD Exam...
[11 replies] Last: Thanks mbozzi , it works great! problem solved 👍 I did try someth... (by ruzip)
by Cplusc
shared pointer
I'm trying to use shared pointer in my code as follows, enum BoundaryType { PressureInlet, Pres...
[9 replies] Last: thanks for your help. (by Cplusc)
by ruzip
Parsing Include Files Recursively
I need a C function that I can parse files recursively like a tree inside a file with a pattern impo...
[19 replies] Last: Thanks seeplus ! (by ruzip)
Function to output all combinations that give a certain value
I have two vectors _A and _B and an equation (x-y)/2, where the x is vector _A and y is _B. So for e...
[3 replies] Last: Not sure that I agree with your model output: #include <iostream> #i... (by lastchance)
by PeteDD
passing char and returning 1-wire DeviceAddress
I am working on a config.ini parser combined with a class that manages sensors in a large data colle...
[2 replies] Last: Thank you Ganado for the good insights that will help me. The address ... (by PeteDD)
C++ 20, designated initializers This is one ve...
[13 replies] Last: Yeah I meant braces. But, okay now I get it. The assignment is the exp... (by Ganado)
by frek
When do you use 'auto' in your code
auto seems to be vey powerfull and flexible like a template. It's possible to use it instead of a ...
[8 replies] Last: What do you guys think of the version used in PS2 in my first post? ... (by MikeyBoy)
string_view is a borrowed range but it can still dangle
I thought iterators to borrowed ranges could not dangle! Because of it being a borrowed_range??? Th...
[1 reply] : [quote=cppreference]The concept borrowed_range defines the requirement... (by Peter87)
by IsaacD
Why doesn't GNU add famous non-standard functions to glibc?
I recently found out that certain non-standard C functions, such as itoa() and strrev() are not avai...
[16 replies] Last: visual provides it anyway, both getch(e) & kbhit (and probably newer o... (by jonnin)
Can somebody explain what is a borrowed_range?
the text reads iterators of borrowed ranges can sill be used when the range itself no longer ...
[1 reply] : A borrowed range is one whose iterator validity doesn't rely on the li... (by seeplus)
How to initialize an array whose size is initially unknown
Hello all , Note: These values[xup -yup -xright - etc ..] are constantly changing My example .. ...
[10 replies] Last: Thanks all , seeplus , jonnin , doug4 Thank you very much for your gre... (by Hawlong)
Multithreading in a dll
I wanted to make two functions running in the background at the same time inside dll My dll #i...
[6 replies] Last: You have made a great effort for my sake, thank your (by Hawlong)
Read / Write Array Of Byte (1,2,3)
Hello all , Please how can read , Array Of Byte (cheat engine). using c ++ (internal) https:/...
[40 replies] Last: Calling a class method on a nullptr is seemingly allowed by MSVC and G... (by George P)
  Archived months: [jan2023] [mar2023]

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