Right now I'm trying to figure out how to split a cstring by a space via a loop. I'm not exactly sure on how to do it.
This is a really rough example of what I'm trying to do rn (I know this isn't a full fuctional code this is just a really rough example of what I'm doing or trying to do)
struct()
{
char first[15] // Issue is trying to split the first variable at the space to set it into this variable
char second[15] // then trying to to set the 2nd word.
}
int main()
{
char fullname[15] = "John Doe";
}
I'm trying to initialize the two words into the structure by splitting the name can anyone give me a explaination on how I would do that?