A
Angus
I am working with a C API which often requires a char* or char buffer. If a
C function returns a char* I can't use string? Or can I? I realise I can
pass a char* using c_str() but what about receiving a char buffer into a
string?
Reason I ask is otherwise I have to guess at what size buffer to create?
And then copy buffer to a string. Doesn't seem ideal.
C function returns a char* I can't use string? Or can I? I realise I can
pass a char* using c_str() but what about receiving a char buffer into a
string?
Reason I ask is otherwise I have to guess at what size buffer to create?
And then copy buffer to a string. Doesn't seem ideal.