快捷键 command + shift + G
Xcode生成C++文件的模板位置:
/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\
Templates/Source/C++\ File.xctemplate/WithHeader
ai-nixs:~ nixinsheng$ sudo -i
Password:
ai-nixs:~ root# cat /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/C++\ File.xctemplate/WithHeader/___FILEBASENAME___.h
//
// ___FILENAME___
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
// C++模板已经过改动by:nixs 1911398892@qq.com
#ifndef _____PROJECTNAME________FILEBASENAMEASIDENTIFIER_____
#define _____PROJECTNAME________FILEBASENAMEASIDENTIFIER_____
#include
using namespace std;
#endif /* defined(_____PROJECTNAME________FILEBASENAMEASIDENTIFIER_____) */
ai-nixs:~ root#
ai-nixs:~ root# cat /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/C++\ File.xctemplate/WithHeader/___FILEBASENAME___.cpp
//
// ___FILENAME___
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
//
#include "___FILEBASENAME___.h"
ai-nixs:~ root#