C++ CGI Scripts

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2005
Posts: 78
Reputation: nanodano is an unknown quantity at this point 
Solved Threads: 2
nanodano's Avatar
nanodano nanodano is offline Offline
Junior Poster in Training

C++ CGI Scripts

 
0
  #1
Jun 12th, 2006
I have been writing some CGI scripts in C++, and I was wondering if anyone else has done the same? I have built a pretty decent sized library of functions I use a lot for formatting form inputs and such. The reason I chose C++ is because I'm so familiar with it. I was wondering if I should do myself a favor and learn a language a little more popular for CGI scripting. From what I know so far, perl or bash scripts wouldn't be as portable and reusable as c++ code would be. What is everyone's opinion on using C++ vs other languages like Perl or PHP
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,867
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 755
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Senior Bitch

Re: C++ CGI Scripts

 
0
  #2
Jun 12th, 2006
I've done enough CGI with C and C++ to realize that they're very poor languages for it. Perl, or any language with powerful string handling capabilities, is much better suited to CGI.
New members chased away this month: 5
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: C++ CGI Scripts

 
0
  #3
Jun 12th, 2006
c++ has strong string handling capabilities.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,867
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 755
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Senior Bitch

Re: C++ CGI Scripts

 
0
  #4
Jun 12th, 2006
>c++ has strong string handling capabilities.
Bwahahahaha!
New members chased away this month: 5
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: C++ CGI Scripts

 
0
  #5
Jun 12th, 2006
>Bwahahahaha!

What so funny _jsw? I thought c++ style strings had reasonably good string handling capabilities?
Or r u making a comparison of pearl's regex library?
Last edited by iamthwee; Jun 12th, 2006 at 10:09 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,867
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 755
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Senior Bitch

Re: C++ CGI Scripts

 
0
  #6
Jun 12th, 2006
>What so funny _jsw?
C++'s string handling capabilities are horrible. Not the worst, that's a spot reserved for C, but pretty low on the totem pole. Anyone who says that C++ is good at text manipulation clearly hasn't don't much of it. That's what's so funny.
New members chased away this month: 5
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: C++ CGI Scripts

 
0
  #7
Jun 12th, 2006
Originally Posted by Narue
>What so funny _jsw?
C++'s string handling capabilities are horrible. Not the worst, that's a spot reserved for C, but pretty low on the totem pole. Anyone who says that C++ is good at text manipulation clearly hasn't don't much of it. That's what's so funny.
hmm, I admit the perl regex library out-do c++ style strings... but c++ style strings still support all these and lest we forget, there is nothing stopping you from using c++ with the boost library.

:cry:
Last edited by iamthwee; Jun 12th, 2006 at 12:00 pm.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,867
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 755
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Senior Bitch

Re: C++ CGI Scripts

 
0
  #8
Jun 12th, 2006
>I admit the perl regex library out-do c++ style strings...
Regex isn't a library, it's built into the language.

>c++ style strings still support all these
Primitive operations that I would expect from any string type. That's not exactly an argument that C++ strings are powerful.

>there is nothing stopping you from using c++ with the boost library
Oh, then that means I can counter you with CPAN?
New members chased away this month: 5
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: C++ CGI Scripts

 
0
  #9
Jun 12th, 2006
>Regex isn't a library, it's built into the language.

That's what I meant. He he.

>Primitive operations that I would expect from any string type. That's not exactly an argument that C++ strings are powerful.

Hmm, but what separates perl from c++? The fact that the regex utilities are built in as opposed to the boost libraries in c++ that are not?


>Oh, then that means I can counter you with CPAN?
Yes you can. :lol:
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,055
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: C++ CGI Scripts

 
2
  #10
Jun 14th, 2006
Originally Posted by iamthwee
Hmm, but what separates perl from c++? The fact that the regex utilities are built in as opposed to the boost libraries in c++ that are not?
It's quite simple. You can get a lot more done in Perl in a given amount of time than you can with C++. It's not worth the extra effort to use C++ because you don't get any considerable speed benefit. You'd be better off paying for a better server and using Perl than you would be using C++ on one cheap server, because bandwidth and perhaps database access time is the main limitation on the end-user's perception of speed.

  1. #!/usr/bin/perl -ap
  2. eval(("\$s[-2]$_=pop\@s",'push@s,$_')[!/^[-+*\/]$/])for@F;$_="$s[-1]\n"

Nothing beats having a one-line RPN calculator, too.
Last edited by Rashakil Fol; Jun 14th, 2006 at 2:40 pm.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 3325 | Replies: 14
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC