I have a little problem.. i’m writing a overloaded save function for an avl tree which is suppose to take an object of a class and use the get methods of the class to write the data into an output file.. i succeeded in implementing the function, but it writes only the first record to the output file and ignore the rest.. below is my code..
void save(AVLNode<Class> *pRoot)
{
ofstream otfl(“output.txt”);
otfl << pRoot -> data.getSignature ( )
<< “,” << pRoot -> data.getName ( )
<< “,” << pRoot -> data.getCrew ( ))
otfl <<endl;
otfl.close();
}
please Help needed!
Tags: asked May 10, 2012Please login to post questions.
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Resources #Terms of Use
Copyright©2012 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com