Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > string parsing

Reply
Thread Tools

string parsing

 
 
Gary Wessle
Guest
Posts: n/a
 
      01-24-2007
Hi

how can I do this in C++

string myword;
string get_word_from_this_url( url ){
bool flag = true;
while flag;
download this url and search for this word;
if found; set flag to false;
retrun word;
}

I know c++ does not have load(url), do I need to go to perl or
some other language?

thanks
 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      01-24-2007
Gary Wessle wrote:
> Hi
>
> how can I do this in C++
>
> string myword;
> string get_word_from_this_url( url ){
> bool flag = true;
> while flag;
> download this url and search for this word;
> if found; set flag to false;
> retrun word;
> }
>
> I know c++ does not have load(url), do I need to go to perl or
> some other language?
>
> thanks


Standard C++ does not have any means of loading a URL. That does not
mean that your C++ implementation does not have one, it probably does.
But this group deals with standard C++ only, so you should ask this
question in a group for your compiler and/or operating system. Since
loading a URL is likely to be a feature of your operating system perhaps
you should try a group about programming C++ on your particular
operating system.

BTW perl would a good choice for string parsing, it's not one of C++'s
better features.
 
Reply With Quote
 
 
 
 
Ondra Holub
Guest
Posts: n/a
 
      01-24-2007

Gary Wessle napsal:
> Hi
>
> how can I do this in C++
>
> string myword;
> string get_word_from_this_url( url ){
> bool flag = true;
> while flag;
> download this url and search for this word;
> if found; set flag to false;
> retrun word;
> }
>
> I know c++ does not have load(url), do I need to go to perl or
> some other language?
>
> thanks


Not part of standard C++. You can use some library or OS specific API.
I recommend to use some library which is supported on many platforms.
For example libCURL (simpler) or ACE (harder to learn but great
library, but for small example you gave it is too strong tool).

 
Reply With Quote
 
raxitsheth2000@yahoo.co.in
Guest
Posts: n/a
 
      01-24-2007

try to do with libwww or curl , they are reusable library that what u
want to do i think,

--raxit


On Jan 24, 11:47 am, Gary Wessle <phd...@yahoo.com> wrote:
> Hi
>
> how can I do this in C++
>
> string myword;
> string get_word_from_this_url( url ){
> bool flag = true;
> while flag;
> download this url and search for this word;
> if found; set flag to false;
> retrun word;
>
> }I know c++ does not have load(url), do I need to go to perl or
> some other language?
>
> thanks


 
Reply With Quote
 
Rolf Magnus
Guest
Posts: n/a
 
      01-24-2007
John Harrison wrote:

> Gary Wessle wrote:
>> Hi
>>
>> how can I do this in C++
>>
>> string myword;
>> string get_word_from_this_url( url ){
>> bool flag = true;
>> while flag;
>> download this url and search for this word;
>> if found; set flag to false;
>> retrun word;
>> }
>>
>> I know c++ does not have load(url), do I need to go to perl or
>> some other language?
>>
>> thanks

>
> Standard C++ does not have any means of loading a URL.


Basically, there is nothing in the standard preventing an fstream
implementation from taking URLs for remote file support. However, such
implementations are rare.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What libraries should I use for MIME parsing, XML parsing, and MySQL ? John Levine Ruby 0 02-02-2012 11:15 PM
[ANN] Parsing Tutorial and YARD 1.0: A C++ Parsing Framework Christopher Diggins C++ 0 07-09-2007 09:01 PM
[ANN] Parsing Tutorial and YARD 1.0: A C++ Parsing Framework Christopher Diggins C++ 0 07-09-2007 08:58 PM
SAX Parsing - Weird results when parsing content between tags. Naren XML 0 05-11-2004 07:25 PM
Perl expression for parsing CSV (ignoring parsing commas when in double quotes) GIMME Perl 2 02-11-2004 05:40 PM



Advertisments