C++ File extension

本文介绍了C++和C语言中源文件和头文件的标准文件扩展名。对于C++,头文件通常使用.h,.hh,.hpp扩展名,而源文件则使用.C,.cpp,.cc。对于C语言,头文件使用.h扩展名,源文件使用.c扩展名。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

C++

Files: .h, .hh, .hpp
Source Files: .C, .cpp, .cc

 

C

Files: .h

Source Files: .c

 

转载于:https://www.cnblogs.com/greencolor/archive/2010/03/11/1683570.html

cd "/Users/cmxxam/Desktop/课程设计/" && g++ test.cpp -o test && "/Users/cmxxam/Desktop/课程设计/"test ➜ 课程设计 cd "/Users/cmxxam/Desktop/课程设计/" && g++ test.cpp -o test && "/Users/cmxxam/Desktop/课程设计/"test test.cpp:61:30: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions] 61 | virtual ~DrawElement() = default; | ^ test.cpp:86:23: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions] 86 | void draw() const override { | ^ test.cpp:94:68: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions] 94 | bool hitTest(const Point& point, double tolerance = 5.0) const override { | ^ test.cpp:105:28: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions] 105 | string getType() const override { return "Line"; } | ^ test.cpp:106:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions] 106 | string serialize() const override { | ^ test.cpp:109:42: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions] 109 | void deserialize(const string& data) override { | ^ test.cpp:126:34: error: a space is required between consecutive right angle brackets (use '> >') 126 | vector<shared_ptr<DrawElement>> elements; | ^~ | > > test.cpp:146:14: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] 146 | for (auto it = elements.rbegin(); it != elements.rend(); ++it) { | ^ test.cpp:200:20: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] 200 | for (const auto& element : elements) file << element->serialize() << endl; | ^ test.cpp:200:34: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] 200 | for (const auto& element : elements) file << element->serialize() << endl; | ^ test.cpp:220:17: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] 220 | auto lineElement = make_shared<Line>(Point(), Point()); | ^ 10 warnings and 1 error generated. ➜ 这些都什么意思
最新发布
06-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值