edelossantos
asked on
Search String
Need checked:
/*
searchString.cpp
*/
#include <iostream>
#include <cstring>
using namespace std;
class Find {
public:
Find();
~Find();
string findString.num();
void display();
};
string Find::findString.num() {
int my_string.find;
string my_str = "test";
string target;
string str;
int matches = 0;
int pos = target.find(str);
while(pos != string::npos) {
matches ++;
pos = target.find(str, pos + 1);
}
}
void display() {
cout << findString.num() << endl;
}
int main() {
Find f;
f.findString.num();
f.display();
return 0;
}
/*
searchString.cpp
*/
#include <iostream>
#include <cstring>
using namespace std;
class Find {
public:
Find();
~Find();
string findString.num();
void display();
};
string Find::findString.num() {
int my_string.find;
string my_str = "test";
string target;
string str;
int matches = 0;
int pos = target.find(str);
while(pos != string::npos) {
matches ++;
pos = target.find(str, pos + 1);
}
}
void display() {
cout << findString.num() << endl;
}
int main() {
Find f;
f.findString.num();
f.display();
return 0;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
jkr,
It was an internal compiler .profile issue on my end. Thanks a million. Del
It was an internal compiler .profile issue on my end. Thanks a million. Del
ASKER
prob1.cpp:55:2: warning: no newline at end of file
what does this mean?