delorie.com/archives/browse.cgi | search |
From: | Fernando <postmaster AT 127 DOT 0 DOT 0 DOT 1> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: why won't my .exe program run properly until I set env var? |
Date: | Wed, 28 Jan 1998 16:06:14 -0500 |
Organization: | My own |
Lines: | 18 |
Message-ID: | <34CF9DC6.70B63542@127.0.0.1> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 980128162026 DOT 4496F-100000 AT is> |
NNTP-Posting-Host: | 147.54.84.90 |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
The variable "n" does not have his own space. So you can't strcat anything to "n". > > main(int argc, char *argv[]) > > { > > char *d, *p, *n, *e; > > int dummy = fnsplit(argv[1], d, p, n, e); > > /* This splits a filename into drive, path, name and extension. */ > > > > dummy = rename("oldname.txt", strcat(n, ".txt")); > > } > -- These are my personal opinions. Email: sanabriaf at yahoo dot com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |