CString to char*

后端 未结 4 1858
清酒与你
清酒与你 2020-12-10 11:47

We are using the CString class throughout most of our code. However sometimes we need to convert to a char *. at the moment we have been doing this using variable.GetBuffer(

4条回答
  •  生来不讨喜
    2020-12-10 12:37

    when you call the getbuffer function it allocates memory for you. when you have done with it, you need to call releasebuffer to deallocate it

提交回复
热议问题