Hi there!<br>
<br>
You need to overload the input stream operator >> for <br>
your class like this:<br>
<br>
<br>
istream& operator>>(istream& in,yourClass& theClass)<br>
{<br>
in >> theClass.attribute1;<br>
in >> theClass.attribute2;<br>
.<br>
.<br>
.<br>
in >> theClass.attributeN;<br>
<br>
return in;<br>
}<br>
<br>
and you use it like this:<br>
<br>
cin >> theClass;<br>
<br>
<br>
Some things to keep in mind:<br>
<br>
1. Don't declare this function as a method in your class.<br>
If you do, you will not be able to use the overloaded<br>
operator correctly. Try it!<br>
<br>
2. Make the function a friend of your class. That way you<br>
will be able to access the private attributes of your<br>
class without having to go through an access method.<br>
This is one of the few places where declaring something<br>
as a "friend", and thereby violating data encapsulation, actually makes sense.<br>
<br>
Hope this helps!<br>
<br>
-Mart311