且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将字符串作为引用类型从C ++/CLI传递到C ++

更新时间:2021-12-02 22:37:07

好吧,让我们看看... expTime未声明,lastUpdatedTime未声明...这甚至无法编译. ..这是您的实际代码吗?

另外,timestampToNewString()的作用是什么?如果它进行了new char[]调用,则在使用完它或发生内存泄漏后,您需要对其进行分配.

...这是什么目的:
Well, lets see... expTime is undeclared, lastUpdatedTime is undeclared... this wouldn''t even compile... is this your actual code?

Additionally, what does timestampToNewString() do? If it makes a new char[] call, then you need to deallocate that after you''re done with it or you have a memory leak.

...and what''s the purpose of this:
for( int n = 0; n < m_Response->m_Count; n++){
  if(bflag)
      nCnt++;
}

//This does the same exact thing (which doesn''t make sense why you''re making a copy of a variable either but...)
if(bflag) nCnt = m_Response->m_Count;