Mega Code Archive

 
Categories / C++ / Data Type
 

Using memchr

#include <iostream> #include <string.h> using namespace std; int main() {    char *s = "This is a string";    cout << "The remainder of s after character 'r' "         << "is found is \"" << (char *) memchr( s, 'r', 16 )          << '\"' << endl;    return 0; }