Hell ive written some code :
#include <iostream>
#include <string>
using namespace std;
int main()
{
string a;
string b;
a = "ABCDEF";
b = "$";
a +=b;
cout << a;
if(a.find == 1 , "$")
cout << "FOUND" << endl;
else
cout << "NOTFOUND" << endl;
if(b.find == 2, "ID")
cout << "FOUND"<<endl;
return 0;
}
notice the 2nd if is testing b.find which b = "$". Should this not find it?? since for a start "ID" isnt in the string and $ is only 1 char. Can anyone shread any light? And can someone maybe suggest another way of doing this?
Thanks peeps
John :)