operators29.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 24 行

C
24
字号
// Build don't link: // GROUPS passed operators// (Message bugs/opr-del:4)// From: jamshid@ses.com (Jamshid Afshar)// Date:     Fri, 25 Feb 94 18:44:01 CST// Subject:  Re: delete on "smart pointers"// Message-ID: <9402262328.AA16321@pancake>// // Who was apparently replying to kuhlins@hawk.wifo.uni-mannheim.detemplate<class T> class Ptr {public:  Ptr(T*);  operator T*();};int main() {  Ptr<int> ip = new int(2);  delete ip;  operator delete(ip);  return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?