Comment on C++ Software Security Sins: Basic IssuesparentComments−hknapp5ywhat do you use? std::array? alloca? std::string? heap allocation? a lot of std library functions need char *−bierjunge5ystd::array<char, 26> foo{}; foo.data(); // <- returns a pointer to foo's data inheriting it's type. so we get *char herestd::string would work in a similar way, except it would be `const`
Comments
what do you use? std::array? alloca? std::string? heap allocation? a lot of std library functions need char *
std::array<char, 26> foo{}; foo.data(); // <- returns a pointer to foo's data inheriting it's type. so we get *char here
std::string would work in a similar way, except it would be `const`