T
T
Tesla4o2018-10-15 18:52:09
C++ / C#
Tesla4o, 2018-10-15 18:52:09

How to save a file in a process started from another process?

There is a program that launches another program using the hello program method to write information to a file. in the end, everything runs fine, everything is displayed correctly in the console, but the file is not created.
std::system("hello");

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2018-10-15
@jcmvbkbc

How to save a file in a process started from another process?

Just like in any other. Because, surprise, any process is started from some other process.
I'd still check to see if it's "performing perfectly". But if true, then perhaps it is not being created where expected?

P
Pavel, 2018-10-16
Yazovskikh @unepic

Check the returned status when opening the file in "hello". If you use fopen, check out www.cplusplus.com/reference/cerrno/errno

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question