|
-
April 27th, 1999, 11:55 AM
#1
Copy 2 Strings in a third string
hi folks
i have problem
i want to copy String_A and String_B in String_C
how can i make this????
after copy the String_C should look like STRING_ASTRING_B
the source i've tried looks like....
int SadClass::Add_To_SadString()
{
char * StringA=NULL;
if(StringC!=NULL)
{
StringA= new char[StringSize*CountRecord];
strcpy(StringA,StringC);
delete StringC;
}
StringC= new char[(int)StreamSize];
if(StringA!=NULL)
{
strcpy(StringC,StringA);
delete StringA;
}
strncpy(StringC + CountRecord * StringSize,StringB ,(int)StreamSize);
CountRecord++;
return 0;
}
please HELP.....
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|