« first day (1965 days earlier)      last day (888 days later) » 

12:18 PM
why C is more commonly used to program microcontrollers than C++? For example all of myRIO sample projects are written in C even tho it supports C++11, why?
 
nwp
Typically used containers like std::vector and std::string can often not be used because people impose the restriction of not using dynamic memory on themselves. The rest I assume is tradition.
The libraries are written in C, tutorials are written in C, everyone uses it and it seems like the advantages of C++ are not enough to overcome that.
There may be other reasons.
 
do you think C++ will eventually replace C for embedded stuff, especially where OO design is required?
 
nwp
12:42 PM
I don't think OO design is required or even particularly helpful for embedded stuff which tends to be more focused on getting the hardware initialization routines right than writing complex software.
It might happen over time, who knows.
 
 
2 hours later…
2:35 PM
char* VertexShaderSource=buff.c_str(); is there a possible way to do this? where buff is a std::string
 
you can always const cast it, or just change VectexShaderSource to be of type const char*
 
thw thing is that it will only be alive till its in the function scope
i kind of need the data to be copied
 
then copy it, or make sure the string lives as long as you need the const char* to live
but for the shader source wouldn't you just pass it to glShaderSource and then be done with it
 
Actually I'm abstracting things out and storing the shaders in seperate files
 
 
3 hours later…
IGP
5:30 PM
Is it illegal to use the this pointer inside a constructor initialization list?
 
nwp
5:57 PM
@Agent_A char* VertexShaderSource = buff.data(); since C++17
 
 
2 hours later…
7:51 PM
Is a virtual memory address exactly the same as a logical memory address?
There seems to be some contradiction online about how they differ
 

« first day (1965 days earlier)      last day (888 days later) »