I'm doing tests on a class I'm writing to deal with Carbon data field IO
My methods work perfectly to get the data as a CFStringRef
I then decided to write the method to get the data as a string.
in order to do this, I used the following code:
this compiles, and the method calls were executedCode:ostringstream strstrBuffer; strstrBuffer<<getCFStringFieldData()<<flush; return strstrBuffer.str();
I then needed to test that they were returning the right thing.
so I declared a string (test), set its value as getDataAsCppString() and executed a cout statement: cout<<test<<"\n";
the program ran and the memory address of test was printed out
how do I get the actual string to print out?



LinkBack URL
About LinkBacks


