+ 4

Run c++ in c++?

i have 2 programs. A and B. and then program B job is to "return 0" if successfully finish it job. and then the "return 0" is reported to program A. i cant solve it...help? i dont want to make B program as header because some problem...

18th Feb 2018, 3:43 AM
Kevin AS
Kevin AS - avatar
9 Respostas
+ 3
@Manual yeah.. how to do that??? A ?<- python <- B ??? @Cry... for this while, im using system("./B")
18th Feb 2018, 4:02 AM
Kevin AS
Kevin AS - avatar
+ 2
Well, since you did not post a code... try multi-threading
18th Feb 2018, 3:52 AM
Manual
Manual - avatar
+ 2
I don’t know the solution, but stackoverflow.com has the answer to almost every programming-related question. I’d suggest googling your question then clicking a stack overflow link because google seems to give more results than their built-in search engine.
18th Feb 2018, 3:53 AM
Jacob Pembleton
Jacob Pembleton - avatar
+ 2
hmm... multi-threading is good one.. but i think something that really best method
18th Feb 2018, 3:55 AM
Kevin AS
Kevin AS - avatar
+ 2
@Maxwell i cant understand what your point is. how can python script is report the result to A program?
18th Feb 2018, 3:59 AM
Kevin AS
Kevin AS - avatar
+ 2
I made an example hope it helps exectute B within A return check or 0 https://code.sololearn.com/cteOpQQC4NPU/?ref=app
18th Feb 2018, 4:11 AM
Manual
Manual - avatar
+ 2
now make a sense... @Great
18th Feb 2018, 4:18 AM
Kevin AS
Kevin AS - avatar
+ 1
@Maxwell im already think something like that and use cstdlib then use system("./program") but i need the best way of that...
18th Feb 2018, 3:53 AM
Kevin AS
Kevin AS - avatar
0
well make one a bool, return true when complete.
18th Feb 2018, 4:00 AM
Manual
Manual - avatar