From: vern Newsgroups: comp.os.msdos.djgpp Subject: Re: reusing string variables Date: Sat, 09 Jan 1999 14:25:29 -0600 Organization: none Lines: 27 Message-ID: <3697BB38.87B2F2D1@iocc.com> References: <3697AD5C DOT C9493E2E AT iocc DOT com> <778dup$65j$1 AT news DOT luth DOT se> NNTP-Posting-Host: 204.214.235.145 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: 915913697 VRL06/YYIEB91CCD6C usenet54.supernews.com X-Complaints-To: newsabuse AT remarQ DOT com X-Mailer: Mozilla 4.06 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com doh! i am using strcpy right now, and it does not work. I want to replace the old contents of a string with new contents, which come from antohter variable. Martin Str|mberg wrote: > > vern (vern AT iocc DOT com) wrote: > : I am looking for a way to reuse the same string variable throughout a > : function. i have a function that changes the contents of a string. > : what i need to do is earase the old contents of the string, and replace > : it with new contents. both the new and old ocntents in teh string are > : the same length. he is the way i currently am using the strings: > : > : msg1=msg2; > : msg2=msg3; > : msg3=msg4; > : msg4=msg; > : > : basicly im jsut rotating the contents of these variables. all are 78 > : elements long, and char type. > > Perhaps strcpy() could be what you're looking for? > > Right, > > MartinS