C++ How to find char in a char array by using find function?

How to find char in a char array by using find function? If I just for loop the vowel then I could have gotten the answer but I'm asked to use std::find.. Thanks.

bool IsVowel (char c) { 

    char vowel[] = {'a', 'e', 'i', 'o', 'u'};            
    bool rtn = std::find(vowel, vowel + 5, c);

    std::cout << " Trace : " << c  << " " << rtn << endl;

    return rtn; 
 }
5
задан durron597 15 July 2015 в 17:23
поделиться