I'm trying to store a string in a struct. Do I need different call names for the string and the string when it's in the struct? What is the correct syntax for something like this?
Storing a string in a struct
I have no clue what you are asking. What language are you talking about? What do you mean by 'call name'?
Are you talking about a c-string (char array) or a c++ string (STL), those are totally different thing. But anyway, you write them pretty much the same way as without a struct:
struct SomeStruct {
char Buffer[256];
};
or
struct SomeStruct {
std::string s;
};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement