stober
December 11th, 2002, 10:55 AM
why does this fail (VC6 on W2K)
#include <string>
int main()
{
string spath = "\\windows\\something";
if(spath.find_first_of("*?") >= 0)
{
// this is always true
// remove the wild cards
}
}
But this works ok:
#include <string>
int main()
{
string spath = "\\windows\\something";
int pos = spath.find_first_of("*?");
if(pos >= 0)
{
// remove the wild cards
}
}
#include <string>
int main()
{
string spath = "\\windows\\something";
if(spath.find_first_of("*?") >= 0)
{
// this is always true
// remove the wild cards
}
}
But this works ok:
#include <string>
int main()
{
string spath = "\\windows\\something";
int pos = spath.find_first_of("*?");
if(pos >= 0)
{
// remove the wild cards
}
}