将 Xcode 中的 hpp 后缀修改为 h

Xcode Version 12.3

  1. 进入目录
    我自己的电脑路径是这个:

    /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/C++ File.xctemplate/WithHeader
    

    网上找到的是这个:

    /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/Source/C++ File.xctemplate/WithHeader/
    
  2. ___FILEBASENAME___.hpp 修改为 ___FILEBASENAME___.h

  3. 编辑 ___FILEBASENAME___.h 文件,把里边的 hpp 都改成 h

  4. 编辑 ___FILEBASENAME___.cpp 文件,把里边的 hpp 都改成 h

    #include "___FILEBASENAME___.h"
    

猜你喜欢

转载自blog.csdn.net/m0_38007695/article/details/112431583