0

I have modify MapCtrl.m to MapCtrl.mm,but xocde5 can not recognize the c++ code,
//MapCtrl.mm

BMKMapPoint* points = new BMKMapPoint[planPointCounts];

delete []points;

The error is:

/Users/jinxudong/Documents/在线生成平台/WeiPai/ViewCtrl/MapCtrl.mm:365:35: Use of undeclared identifier 'new'
/Users/jinxudong/Documents/在线生成平台/WeiPai/ViewCtrl/MapCtrl.mm:327:3: Use of undeclared    identifier 'delete'; did you mean 'undelete'?
karocxing
  • 1
  • 2
  • http://stackoverflow.com/questions/10335285/c-language-what-does-the-mm-extension-stand-for or http://stackoverflow.com/questions/652186/why-do-objective-c-files-use-the-m-extension – mr5 Dec 08 '13 at 04:50
  • i know .mm is for c++ compile ,my questions is why comes out the error – karocxing Dec 08 '13 at 06:54
  • Maybe try renaming your file into a recognizable file format(?) such as `.cpp` – mr5 Dec 08 '13 at 07:46

0 Answers0