其他分享
首页 > 其他分享> > CFX_StringData

CFX_StringData

作者:互联网

// 你必须定义一个 `main()` 函数入口。
#include <iostream>
using namespace std;
typedef const char* FX_LPCSTR;
typedef char FX_CHAR;
typedef int FX_STRSIZE;
class CFX_Object
{
  public:
  void* operator new(size_t size, FX_LPCSTR file, int line)
  {
    return malloc(size);
  }
  
  void operator delete(void*p,FX_LPCSTR file,int size)
  {
    free(p);
  }
  void* operator new(size_t size)
  {
    return malloc(size);
  }
  void operator delete(void* p)
  {
    free(p);
  }
    void*			operator new[] (size_t size, FX_LPCSTR file, int line)
    {
        return malloc(size);
    }
    void			operator delete[] (void* p, FX_LPCSTR file, int line)
    {
        free(p);
    }
    void*			operator new[] (size_t size)
    {
        return malloc(size);
    }
    void			operator delete[] (void* p)
    {
        free(p);
    }
    void*			operator new (size_t, void* buf)
    {
        return buf;
    }
    void			operator delete (void*, void*)							{}
};
struct CFX_StringData {

    long		m_nRefs;

    FX_STRSIZE	m_nDataLength;

    FX_STRSIZE	m_nAllocLength;
    FX_CHAR		m_String[1];
   
};
 
int main()
{
 
  cout << "Hello, World!" << endl;
  return 0;
}
 

  

标签:FX,void,LPCSTR,int,CFX,operator,StringData,size
来源: https://www.cnblogs.com/hshy/p/15747337.html