By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

opening from a .Dat file

DanielTNBaker
P: 7
to the point this is the code i got:

#define CLIENTS "F:\\IVA\Clients.DAT"

im using turbo C++3

programs looking kl each function works but..

...everytime i try to display the clients in the DAT file they dont appear to be there.
i checked it out and it appears the DAT file isn't being created..

is the code wrong????
Feb 26 '07 #1
Share this Question
Share on Google+
4 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
to the point this is the code i got:

#define CLIENTS "F:\\IVA\Clients.DAT"

im using turbo C++3

programs looking kl each function works but..

...everytime i try to display the clients in the DAT file they dont appear to be there.
i checked it out and it appears the DAT file isn't being created..

is the code wrong????
I'm not entirely sure how Turbo C++ deals with slashes, but you might try backwhacking your file path (ie - for every single slash, put two).
Feb 26 '07 #2

DanielTNBaker
P: 7
cheers man

that worked

=]
Feb 26 '07 #3

sicarie
Expert Mod 2.5K+
P: 4,677
cheers man

that worked

=]
Glad to hear it!
Feb 26 '07 #4

Ganon11
Expert 2.5K+
P: 3,652
Most compilers (if not all) require you to use two backslashes in place of one when dealing with strings (especially filenames). The reason is that the backslash character is used for escape sequences such as \n (newline). If you want to print an actual backslash, you use the escape sequence for backslashes - \\. Thus,

"C:\\My Folder\\MyFile.ext"

is read in as

C:\My Folder\MyFile.ext

because the \\ are 'compiled' into \.
Feb 26 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.