[A89] how do i unsubscribe


[Prev][Next][Index][Thread]

[A89] how do i unsubscribe




how do i unsubscribe?!?!


>From: jeff <jefromi42@yahoo.com>
>Reply-To: assembly-89@lists.ticalc.org
>To: assembly-89@lists.ticalc.org
>Subject: [A89] Re: Another Stupid String Question
>Date: Fri, 29 Jun 2001 07:09:02 -0700 (PDT)
>
>
>You could do a character by character manual copy thing, but this seems to 
>work too:
>void _main(void)
>{
>	char *string="main\\var";  //be sure to initialize it with the doulbe 
>slash!
>	int offset=strstr(string,"\\")-string;   //finds the difference between 
>the slash and the start
>of the string
>	char *folder=alloca(offset);      //allocates that much for the folder
>	char *name=alloca(strlen(string)-offset-1);    //allocates the length of 
>the original minus the
>slash and folder name for the varname
>	strncpy(folder,string,offset);      //copies just the folder
>	strcpy(name,string+offset+1);       //copies starting at the beginning of 
>the var to the end
>	ClrScr();
>	printf("%s\\%s",folder,name);       //prints out the path
>	ngetchx();
>}
>
>jeff
>
>--- Brett1228@aol.com wrote:
> > I have a string declared like this:
> >
> > char *string;
> >
> > This string will contain a pathName and variableName, such as
> > "main\testprog". I want to put the pathName in one string, and the
> > variableName in the other. I just can't figure this out! I've been 
>trying to
> > use strncat and strncpy, but nothing I do works.
> >
> > Can anyone come up with code to do this for me? Thanks a lot!
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail
>http://personal.mail.yahoo.com/
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com