// Validates subdomain part and returns true if the Address corresponds
// to a well formed email subdomain part, returns false otherwise
bool IsValid();
private:
// The encapsulated subdomain part
vector<string> Address;
};
I do have a main function, but the whole project is too big to post here.
// Subdomain.h - subdomain part validation class declaration
// Written by Meng Jin
// Validates subdomain part and returns true if the Address corresponds
// to a well formed email subdomain part, returns false otherwise
bool IsValid();
private:
// The encapsulated subdomain part
[code] string Address;
};
does this one function the same as the one above?
I tried use the below codes outside Subdomain class, if I use member function from vector push_back or operator [], an error c2039: '_Swap_adl' is not a member of 'std' will happen in vs2008
There's no such thing as a string vector class. You mean a vector of strings?
I'm pretty sure you can't inherit directly from a specialization of a template. (I may be wrong, someone please check.) But you can write a wrapper for the vector of strings you have in mind. Just make a member of your class a std::vector<string>.
Once again, either use code tags or put your code up on something like pastebin.