Question

Locked

Need (General) help on External File Access Using C++

By des949penn ·
I'm attempting to get a commercial adaptation of a rail traffic-control simulation model to interact with a home-brewed program duplicating the dispatcher's thinking, previously written (without any I/O interface) in BASIC a few years ago, now being redeveloped in C++.

I've been learning C++ for a couple of months; have no problem with commonly-used programming functions, what little I've scraped off the 'Net makes a reference to "high-level file access"; we could use a reference more attuned to general orientation if anyone can suggest one.

The commercial program has a fully-developed external I/O interface using a set of text files which reside in the same folder as the application (O/S is Windows XP Pro).

I can generate commands, which should cause changes in settings on the commercial application when recognized, but am not familiar with the technique to enter them on the input file, which apparently can't be relocated to my program. Any help would be appreciated. - Thanks!

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

UPDATE

by des949penn In reply to Need (General) help on Ex ...

Since the previous post I have been able to send text to the destination file, but only when that file resides on a 3.5" diskette.

Attempts to re-orient the output to a file on the hard disk by changing the destination from 'c' to 'a' were unsuccessful, whether the destination file resides in a separate folder or not

To further elaborate:

the command

outFile.open ("a:mydata.out");

will write the text specified as "mydata" to a diskette

But the command

outFile.open ("c:mydata.out"};

won't create similar output on the hard disk, nor will the command

outFile.open {"c:myfolder/mydata.out);

write that output to a specified folder

the only preprocessor direcives in use are "iostream","fstream" and "iomanip", if this is a factor

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums