[NTLUG:Discuss] C pointer questions

Greg Edwards greg at nas-inet.com
Wed Nov 27 10:20:22 CST 2002


Fred James wrote:

> What I am trying to do is append one body of text to another (B to A), 
> both of which are referenced by pointers, and then copy A to B so the 
> result would be the same as if I had inserted A at the top of B (because 
> I am going to use B in my final fwrite()).  Any suggestions would be 
> most apprecated.  Full code upon request.
> 



> 
> Here is the same snippet plus some stuff I am trying to add (at the 
> top), without too much success so far:
> [modified code begins]
>     sprintf(AppendCmd, "echo \"~|uuencode '%s'\" > '%s'", pAttachment, 
> pAttachment);
>     system(AppendCmd);
>     sprintf(AppendCmd, "cat '%s' >> '%s'", pMessage, pAttachment);
>     system(AppendCmd);
>     pMessage = pAttachment;
> 


Fred,


What are the problems your having?  If it's with the system() commands 
you might try prefixing an "sh -c" to the command.


-- 
Greg Edwards
New Age Software, Inc.
http://www.nas-inet.com





More information about the Discuss mailing list