Xcode新建cpp文件,头文件默认为.hpp后缀。如何默认创建.h后缀?

内容目录

1)Go to Folder

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

 

2)将___FILEBASENAME___文件中的hpp,都更改为h。如下:

___FILEBASENAME___.h

复制代码

////  ___FILENAME___//  ___PROJECTNAME___////  Created by ___FULLUSERNAME___ on ___DATE___.//___COPYRIGHT___//#ifndef ___FILEBASENAMEASIDENTIFIER____h#define ___FILEBASENAMEASIDENTIFIER____h#include <stdio.h>#endif /* ___FILEBASENAMEASIDENTIFIER____h */

复制代码

___FILEBASENAME___.cpp

复制代码

////  ___FILENAME___//  ___PROJECTNAME___////  Created by ___FULLUSERNAME___ on ___DATE___.//___COPYRIGHT___//#include "___FILEBASENAME___.h"

复制代码

 

发表回复