Link to home
Start Free TrialLog in
Avatar of edelossantos
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;

}


ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of edelossantos
edelossantos

ASKER

I am getting this:

prob1.cpp:55:2: warning: no newline at end of file

what does this mean?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jkr,

It was an internal compiler .profile issue on my end.  Thanks a million.  Del