| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | fopen - specify director |
TT> KK> fopen("c:\\testfile", w); /* this will work. */
TT> RS> Yes, assuming w is a char pointer to a string, like
"wt" or some
TT> RS> such.
TT>Except for the fact that "wt" is non-standard. You should
TT>use "w" instead for text files (and of course "wb" for
TT>binary files).
GW> Why not use "wt"? It's a common language extension. The
only compiler
GW> I've got here that doesn't provide the capability to set the default
GW> open mode to binary rather than text is the IBM Visualage C++, so
GW> always specifying the open type in fopen() is not (imho) a bad thing.
GW> Borland (3.1 and BCOS2 1.0), MS (5.1, 6.0), TopSpeed and Watcom (11)
GW> all use the global variable _fmode to set default open mode, and
GW> default it to text mode.
Yeah, I read your reply _after_ I've typed up mine. Oh well,
I'll post it anyways.
... A feature is a bug with seniority.
___ Blue Wave/DOS v2.30 [NR]
--- Maximus 2.01wb
* Origin: Basic'ly Computers: Mooo-ing Right Along. (1:153/9)SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728 SEEN-BY: 639/252 670/213 218 @PATH: 153/104 2 716 7715 140/1 270/101 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.