Nov 13, 2014 at 9:20am UTC
Do not return root->barcode
, instead write it to the stream. So you need the stream as the parameter to get_bar(...)
Nov 14, 2014 at 12:25am UTC
thanks i try again...but pls tell me do I need to include writefile as part of class method? or separate method?
Last edited on Nov 14, 2014 at 12:39am UTC
Nov 14, 2014 at 7:49am UTC
It's the difference between
void writehdware( bst& tree , char file[]){
and
void bst:: writehdware(char file[]){
Since logic wise there's no difference it is up to you whether you want it be part of the class or not. boost for instance often separates the data from it's representation (as a file, string, etc.)
Nov 14, 2014 at 1:15pm UTC
On line 12: replace while
with if
Nov 14, 2014 at 10:05pm UTC
Thanks! its working..
Last edited on Nov 14, 2014 at 10:42pm UTC