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

Debugging when one program calls another

P: n/a
I have a program written in C++ with STL that does work. If I double
click on the executable, it examines a data source and write a report
to a file and writes useful messages to cout.

I want to be able to call this from another program, for example, a

So I write a small test application that only calls the working

When I run the test program, I can see from the on screen messages it
has successfully called the working application with correct arguments
and the working application is correctly reading the data. But this
routine does not run:

Table::Table(ifstream &src, vector<string&realm_list)
realm_list = this->realm_list(src);
size_t i = 0;
ofstream out_file("tmp_realms.tbl", ios::out);
if (!out_file.is_open())
cout << "No file!!" << endl;

for (i = 0; i != realm_list.size(); ++i)
cout << realm_list[i] << endl;

out_file << realm_list[i] << endl;

So if I call it directly it runs perfectly but if I call it from
another appliaction it does not run. And I can't work out how to debug
this to see where or why it fails.

Can anyone suggest a way forward?

Nov 13 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a

Nov 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.