GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-May-2006, 20:46
mag_um mag_um is offline
New Member
 
Join Date: May 2006
Posts: 3
mag_um is on a distinguished road

call another programme


Hi guys! I'm new to c programming.

I need help to call another programme at the end. Hope you guys can guide me.

Thanks in advance.

exp:
CPP / C++ / C Code:
/* program1.c*/
main()
{

int a, b, c;

printf("Please enter value for a:");
scanf("%d", &a);

printf("Please enter value for b:");
scanf("%d",&b);

c=a+b;

If(c>10){

/* call program2.c*/
}

else
{
/*call program3.c*/

}

}
Last edited by cable_guy_67 : 04-May-2006 at 21:46. Reason: Please surround your C code with [c] your code [/c]
  #2  
Old 04-May-2006, 22:08
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,243
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: call another programme


Since you are new to this board, it will help if you read the Guidelines

Since you are new to C, you really need to describe your problem better. I question whether you want to "call a program" but rather "call a function", but maybe not. Check out Guideline 2..
__________________

Age is unimportant -- except in cheese
  #3  
Old 04-May-2006, 23:11
mag_um mag_um is offline
New Member
 
Join Date: May 2006
Posts: 3
mag_um is on a distinguished road

Re: call another programme


Hi thanks for your reply.

I'm try to call or execute program2.c when a condition is fulfiled in program1.c. If not it should be able to execute program3.c. I really need to call program not function.

I also prefer to call program2.php and program3.php if posible intead calling program2.c and program3.c

Thanks.
  #4  
Old 04-May-2006, 23:46
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,243
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: call another programme


You're going way beyond beginning C. Running PHP code I'm not sure what to do.

For a program, look up the system() function.
__________________

Age is unimportant -- except in cheese
  #5  
Old 05-May-2006, 01:36
mag_um mag_um is offline
New Member
 
Join Date: May 2006
Posts: 3
mag_um is on a distinguished road

Re: call another programme


Hi. Thanks. I'll try on int.
 
 

Recent GIDBlogToyota - 2008 August Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to call other aplication from code(media player, change themes, backgrounds) jaininaveen C++ Forum 2 07-Feb-2006 18:37
how to call the (appropriate) compiler? candlewax C++ Forum 3 22-Nov-2005 16:12
how to call OnDraw in another class. kumaran MS Visual C++ / MFC Forum 0 03-Mar-2005 03:02
Phone call from computer mrkamran Computer Hardware Forum 3 21-Feb-2004 13:03
Deactivate Screensaver by call toripan Computer Software Forum - Windows 2 11-Feb-2004 10:13

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:00.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.