at school,I was given the class aName and asked to overload the input operator.the class has declared surname as type of char* and the surname is input from the keyboard and it must not be empty.please help me with the code.the class has declared the operator as its friend
khotso
0
Newbie Poster
Recommended Answers
Jump to Postpost the class then we can discuss how to implement to >> operator.
Jump to PostPlease use code tags. You can find what you're looking for here:
http://www.learncpp.com/cpp-tutorial/93-overloading-the-io-operators/
All 6 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
khotso
0
Newbie Poster
daviddoria
334
Posting Virtuoso
Featured Poster
jencas
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.