473,382 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

spawnvp does not call exe files

#include <stdio.h>
#include <conio.h>
#include <process.h>

//Tv Rental system menu version 1
int user_selection();
void display_menu();
void call_program(int option,char *argv[]);
int main(int ,char *argv[])
{
int option;
do
{
display_menu();
option=user_selection();
if (option!=7) //Exit
call_program(option,argv);
}
while (option!=7);
return 0;
}
void display_menu()
{
clrscr();
printf("1 hello1");
printf("\n2 hello2");
printf("\n3 exit");
}

int user_selection()
{
int opt;
printf("\n Enter required option(1-3) : ");
scanf("%1d",&opt);
return (opt);
}

void call_program(int opt,char *argv[])
{
void delay();
switch(opt)
{
case 1:
spawnvp(0,"hello1.exe",argv);
delay();
break;
case 2:
spawnvp(0,"hello2.exe",argv);
delay();
break;
default:
printf("\n incoreect input");
delay();
exit(0);
}
}
void delay()
{
int i;
for (i=0;i<20000;i++);
}
Jul 22 '05 #1
2 1827
"hp******@yahoo.com" <eh***********@yahoo.com> wrote in message
news:7e**************************@posting.google.c om...
#include <stdio.h>
#include <conio.h>
#include <process.h>


http://www.slack.net/~shiva/welcome.txt

-Mike
Jul 22 '05 #2
hp******@yahoo.com wrote:
[redacted]

What is this "spawnvp" of which you speak? My implementation doesn't
have it.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: hpy_awad | last post by:
#include <stdio.h> #include <conio.h> #include <process.h> //Tv Rental system menu version 1 int user_selection(); void display_menu(); void call_program(int option,char *argv); int main(int...
2
by: hpy_awad | last post by:
I wrote that program but spawnvp dows not call the exe files hello1,hello2!!! #include <stdio.h> #include <conio.h> #include <process.h> //Tv Rental system menu version 1 int...
3
by: for.fun | last post by:
Hi everybody, I am looking for a XML comparison tool (I do not mean a standard char-by-char diff tool but a tool which understand XML syntax) More precisely, I can have serveral XML...
0
by: bob | last post by:
I have a somewhat complex question about how Threading works across the network. Below is the full source code of a program that will list any file modified on myServer. When I run this code from...
5
by: Rashad Rivera | last post by:
I need to know why the Application_Start function fires twice when it initializes. It is doing double work and messing up my process. Thanks for your help - Rashad
4
by: rn5a | last post by:
Consider the following code: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Dim dInfo As DirectoryInfo dInfo = New DirectoryInfo(Server.MapPath("/Folder1"))...
9
by: DanielJohnson | last post by:
I am wondering where does the value returned by main goes. Suppoes main returns some number say 42, where is it stored. Supposed a shell script call a C program and the program returns the value...
6
by: Steve Richter | last post by:
what with the website solution structure not having a namespace, how does the class of one website .aspx page class reference the class of another page in the same website? I have two pages....
5
by: Raman | last post by:
Hi All, We have an old code base which (unfortunatelty) has some C files that include other C files:e.g File.c ===== #include<stdio.h> .. void someFunc(){
8
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I have some code (given to me), but I don't know alot about ASP, so I was hoping someone here can help. Running on Win 2008 server. The code below will scan a folder and subfolder...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.