5 ms·
Where is the memory holding the string in the first naive example? To those more familiar with C than C++ it seems like the function returns a pointer to a stac
by piker 3y ago
Where is the memory holding the string in the first naive example? To those more familiar with C than C++ it seems like the function returns a pointer to a stack allocation… no?
- ginko 3y agoString literals are pointers to a read-only data section of the program binary.