Q:

What am I doing wrong here with find and string?

I am asking user to enter date in format with slashes. Then I try to find the slashes in the string using find. I get error saying I cannot compare pointer with integer on my if statement. Here is code.
// test inputing string date formats
#include <iostream>
#include <string>
#include <algorithm>

int main() {
   std::string dateString;
   int month,day,year;

   std::cout << "Enter a date in format of 5/14/1999: ";
   std::getline(std::cin,dateString);

   std::cout << "You entered " << dateString << std::endl;

   if (std::find(dateString.begin(),dateString.end(),"/") != dateString.end()) {
      std::cout << "Found slash in date.\n";
   }
   else {
      std::cout << "screwed it up.\n";
   }
}

Any help is appreciated.

A:

if (std::find(dateString.begin(),dateString.end(),"/") != dateString.end()) {

"/" is a literal string, or a const char * (actually a const char[2] in this case, to be pedantic, but this is not germane) . The third parameter to std::find, in this case, should be a char, a single character.
You probably meant
if (std::find(dateString.begin(),dateString.end(),'/') != dateString.end()) {

