On Tue, Mar 02, 1999 at 09:30:22PM +, James wrote:
> # #define LOGFILE /APPHOME/applogfile /* APPHOME is the actual home
> # directory for the application */
>
> # remove("LOGFILE"); /* First remove the old logfile */
> # LogFile = fopen("LOGFILE", "w");
I don't unde
On Tue, 2 Mar 1999 [EMAIL PROTECTED] wrote:
# #define LOGFILE /APPHOME/applogfile /* APPHOME is the actual home
# directory for the application */
# remove("LOGFILE");/* First remove the old logfile */
# LogFile = fopen("LOGFILE", "w");
you know how using #define's replace
On Tue, 2 Mar 1999 [EMAIL PROTECTED] wrote:
# My friend says that I should buy the K&R but i think I read somewhere that
# it's 'old C', not ANSII C. Is this correct ?
no, the K&R ANSI C Book is for ANSI (One I) C... I think you're confusing
it with K&R C which is old C.
this is the book to buy
On Tue, Mar 02, 1999 at 11:45:58AM +0100, [EMAIL PROTECTED] wrote:
> My friend says that I should buy the K&R but i think I read somewhere that
> it's 'old C', not ANSII C. Is this correct ?
>
No the second edition (1988) is ANSI C. (I'm sure I recall seeing a Dutch
translation, as well).
--
C
It might be 'old C', I'm not really sure, but it is the definitive C book.
It's only about 150-200 pages but it can answer just about any C question.
Another thing you might want to try, most unix systems have man pages for
most C functions which are usually pretty helpful; giving examples and
thi
Try doing something like this
const char Logfile = '/usr/people/bob/APHOME/applogfile'
FILE *fp
remove("LogFile");
fp = fopen("LogFile", "w");
.
.
.
What it sounds like is that your #define isn't getting the entire path to
the file so it's just doing what it can with what it knows, which is t
Oeps, found it myself :-) I should have done :
#define LOGFILE "/APPHOME/applogfile"
...
LogFile = fopen(LOGFILE,"w");
I think I should buy a better C-book. My book (a dutch one, not very known)
defines #define as follows :
#define identifier string
with an example : #define TITLE This