Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 5th, 2005, 7:10 PM   #1
BaroN NighT
Programmer
 
Join Date: Mar 2005
Location: USA
Posts: 60
Rep Power: 4 BaroN NighT is on a distinguished road
Cant call c++ program in cgi script. HELP!

I'm trying to make a cgi script using perl to call a c++ program. I have all my programs in the same directory as the cgi script. This is part of the script that I have problem with:
if($pairs[2] eq "language=Cpp" && $pairs[3] eq "datatype=ID"){
 $pairs[3]=~/.+=(\w+)/;
 my $ID=$1;
 $pairs[4]=~/.+=(\d+)/;
 my $studentID=$1;
 @getC=`./main.exe $ID $studentID`; #this is where I think the program fails
}
I tried to run the web page without the last line and it works. So I'm pretty sure the last line where I call the C++ program is where the script fails. But I dont know why, isnt that the way how you call a c++ program from a cgi script? Thank you in advance for your help guys!
BaroN NighT is offline   Reply With Quote
Old Dec 5th, 2005, 9:03 PM   #2
BaroN NighT
Programmer
 
Join Date: Mar 2005
Location: USA
Posts: 60
Rep Power: 4 BaroN NighT is on a distinguished road
I got it! wooohooo, i had to use the 'my' thingy. Thx for looking everybody .
BaroN NighT is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:27 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC