#include <iostream>
#include <cstring>
using namespace std;
int main() {
const char *url = "server.com";
const char *url2 = "Apache.org";
const char *emailaddr = "Herb@server.com";
const char *tld[] = { ".com", ".net", ".org" };
const char *p;
// Search for a specific character.
p = strchr(emailaddr, '@');
if(p) cout << "Site name of e-mail address is: " << p+1 << endl;
return 0;
}
|