Sir,
I just wanted to know how i will opened file (any exe or other
type file )in c++ and run it.
and how we will give path when we are opening it.
please give me the code of this small program.
thanks in advance 2 1777
On 2008-09-11 14:44, sam wrote:
Sir,
I just wanted to know how i will opened file (any exe or other
type file )in c++ and run it.
and how we will give path when we are opening it.
please give me the code of this small program.
You can use system() to run another program, but I would strongly
discourage its use. There are other ways to execute another program but
they are all platform dependent, but many platforms are more or less
POSIX compatible and supports exec() and friends.
--
Erik Wikström
sam <sa*******@gmai l.comwrote:
>Sir,
I just wanted to know how i will opened file (any exe or other type file )in c++ and run it. and how we will give path when we are opening it. please give me the code of this small program.
That depends on what operating system you're using. Linux/Unix would
use a "fork" call, Windows programs would use something in the Win32
API. You should ask in a platform-specific group (or consult your
system documentation), it's off-topic here.
--
Tim Slattery Sl********@bls. gov http://members.cox.net/slatteryt This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: PM |
last post by:
Has anyone found a way to open a file exclusively where it
will fail if the file is already open, i have tried the
following
_FileStream = new FileStream(@"C:\Data.txt",
FileMode.Open, FileAccess.ReadWrite, FileShare.None);
which does not prevent me from opening the file even if
another user has the file open ie Notepad, it will prevent
me...
|
by: PM |
last post by:
Has anyone found a way to open a file exclusively where it
will fail if the file is already open, i have tried the
following
_FileStream = new FileStream(@"C:\Data.txt",
FileMode.Open, FileAccess.ReadWrite, FileShare.None);
which does not prevent me from opening the file even if
another user has the file open ie Notepad, it will prevent
me...
|
by: aldrin |
last post by:
I'm trying to run this code under windows xp sp2 using codeblocks v1.0
compiler with great difficulty.There is no problem with running this
under KDevelop in linux. Any help would be greatly appreciated.
Enter an interesting string.
Too many cooks spoil the broth
Error opening C:\myfile.txt for writing. Program termnated.
This...
|
by: Craig |
last post by:
Hi there,
I'm trying to open colour BMPs using PIL and I'm getting the following
errors.
Opening a 16 colour BMP I get:
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
|
by: Alexnb |
last post by:
Gerhard Häring wrote:
No, it didn't work, but it gave me some interesting feedback when I ran it
in the shell. Heres what it told me:
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
os.startfile("C:\Documents and Settings\Alex\My Documents\My
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |