473,406 Members | 2,745 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,406 software developers and data experts.

string parsing

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
Jan 24 '07 #1
4 2124
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.
Jan 24 '07 #2

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).

Jan 24 '07 #3

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.comwrote:
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
Jan 24 '07 #4
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.

Jan 24 '07 #5

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

Similar topics

26
by: Kai Jaensch | last post by:
Hello, i am an newbie and i have to to solve this problem as fast as i can. But at this time i don´t have a lot of success. Can anybody help me (and understand my english :-))? I have a...
18
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
50
by: z. f. | last post by:
HI, i have string in format dd/mm/yyyyy hh:mm:ss and giving this as an input to DateTime.Parse gives a string was not recognized as a valid date time format string error. how do i make the parse...
9
by: Python.LeoJay | last post by:
Dear all, i need to parse billions of numbers from a file into float numbers for further calculation. i'm not satisfied with the speed of atof() function on my machine(i'm using visual c++ 6)....
4
by: Michael Meckelein | last post by:
Hello, Wondering, if C# (framework 2.0) does not support parsing DateTime timezones in three letter acronyms. I would like to parse date strings like "2005 Nov 01 11:58:47.490 CST -6:00" but...
3
by: dimasteg | last post by:
Hi all C. Nead some help with string "on the fly" parsing, how it can be realized ? Any ideas? I got some of my own, but it's interesting to get other points of view . Regards.
9
balabaster
by: balabaster | last post by:
I'm looking for some ideas regarding string parsing and brackets. Say I have the following string: 56*(73+23/(28+(7/14)-(3/2)) What would be the best way to parse the string for each opening...
6
by: James Arnold | last post by:
Hello, I am new to C and I am trying to write a few small applications to get some hands-on practise! I am trying to write a random string generator, based on a masked input. For example, given...
6
by: (2b|!2b)==? | last post by:
I am expecting a string of this format: "id1:param1,param2;id2:param1,param2,param3;id" The tokens are seperated by semicolon ";" However each token is really a struct of the following...
1
by: eyeore | last post by:
Hello everyone my String reverse code works but my professor wants me to use pop top push or Stack code and parsing code could you please teach me how to make this code work with pop top push or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.