Execute a file with a certain exe

Page 1 of 1

1 Replies - 233 Views - Last Post: 22 January 2013 - 05:40 PM Rate Topic: -----

#1 raftech  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-January 13

Execute a file with a certain exe

Posted 22 January 2013 - 05:22 PM

Hi,

Im am trying to figure out how to run a python file (window.py) with a certain program (pythonw.exe) in c++ so how do I do this because it is really hard to try and figure out how. I first got told to do it like this
[code]
system("pythonw.exe myfile.py");
[code]

but it just comes up with this error
[code]
mingw32-g++.exe -Wall -fexceptions -g -c "E:\Raftech\C++\C++ Projects\EXE Program\main.cpp" -o obj\Debug\main.o
E:\Raftech\C++\C++ Projects\EXE Program\main.cpp:1:7: error: expected constructor, destructor, or type conversion before '(' token
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)
[code]

Is This A Good Question/Topic? 0
  • +

Replies To: Execute a file with a certain exe

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5573
  • View blog
  • Posts: 11,913
  • Joined: 02-June 10

Re: Execute a file with a certain exe

Posted 22 January 2013 - 05:40 PM

Please don't open multiple threads for the same issue.
http://www.dreaminco...or-please-help/

code tags work like this: one at the start, one at the end of the code
:code:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1