
March 1st, 2002, 09:23 AM
|
|
Junior Member
|
|
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
string dissapearing problem using strcpy and strcat
/*Hey all.....I have a little problem.*/
/*I create a string and initialise it*/
char longstring[250];
strcpy(longstring, "host-");
/*I also have another string query[500] and later in the code I initialise that.....then I add to it using strcat*/
/*THEN, for some mystical reason.....longstring[250] has, ummm.....dissapeared.....(longstring == "").....funny, huh? especially seeing as it isn't mentioned in the code AT ALL inbetween the points when it's there and when it's not*/
/*one other thing I noticed is that while all this is going through a loop, after a while, (longstring == 0), then after another while, (longstring == 00)......???????*/
anyone have any idea what's going on??????
thanks,
Des.
|