S
Some Clown
Greetings,
I'm trying to figure out how to loop through a vector of strings, searching
each item as I go for either a boolean condition or a "contains" test. So
if my vector is called 'v' I need to test v.0 for a boolean condition, then
test v.1 and put the results in a new string, etc.
I've tried several methods, none of which have worked. I've also been
looking through my shiny "The C++ Programming Language" guide, but that's
not so much of a "how-to" as a reference for those who already know. Kinda
like looking in the dictionary to learn how to spell a word that you can't
find because you don't know how to spell it.
Here's the snippet I most recently tried, which obviously doesn't work:
------------------- snip ---------------------------
for(i = 0; i < wholeCmdLine.size(); i++)
{
if(wholeCmdLine.find(".m3u"))
{
std::string playListFileName = wholeCmdLine;
std::cout << playListFileName;
}
//else usage();
}
------------------- snip ---------------------------
I'm trying to figure out how to loop through a vector of strings, searching
each item as I go for either a boolean condition or a "contains" test. So
if my vector is called 'v' I need to test v.0 for a boolean condition, then
test v.1 and put the results in a new string, etc.
I've tried several methods, none of which have worked. I've also been
looking through my shiny "The C++ Programming Language" guide, but that's
not so much of a "how-to" as a reference for those who already know. Kinda
like looking in the dictionary to learn how to spell a word that you can't
find because you don't know how to spell it.
Here's the snippet I most recently tried, which obviously doesn't work:
------------------- snip ---------------------------
for(i = 0; i < wholeCmdLine.size(); i++)
{
if(wholeCmdLine.find(".m3u"))
{
std::string playListFileName = wholeCmdLine;
std::cout << playListFileName;
}
//else usage();
}
------------------- snip ---------------------------