S
spike
My prygram goes through a string to find names between '\'-characters
The problem is, parts of the name in sTemp remains if the new name is
shorter than the old name.
code
---------------------------------------------------
char sTemp[50];
char sText[] = "THELONGESTNAME\\samantha\\gregor\\spike\\..."; // and
so on...
....
some code
....
int i=0;
while((sText != '\\'))
{
sTemp = sText;
i++;
}
printf("Name: %s\n",sNameBuff);
// Here i want to reset the string, totally empty it.
// this dosent do it.
sNameBuff == "";
// Start over again...
....
-------------------------
example output:
Name: THELONGESTNAME
Name: samanthaSTNAME
Name: gregorhaSTNAME
Name: spikerhaSTNAME
How can i make the string completely empty?
The problem is, parts of the name in sTemp remains if the new name is
shorter than the old name.
code
---------------------------------------------------
char sTemp[50];
char sText[] = "THELONGESTNAME\\samantha\\gregor\\spike\\..."; // and
so on...
....
some code
....
int i=0;
while((sText != '\\'))
{
sTemp = sText;
i++;
}
printf("Name: %s\n",sNameBuff);
// Here i want to reset the string, totally empty it.
// this dosent do it.
sNameBuff == "";
// Start over again...
....
-------------------------
example output:
Name: THELONGESTNAME
Name: samanthaSTNAME
Name: gregorhaSTNAME
Name: spikerhaSTNAME
How can i make the string completely empty?