C++ primer plus第八章
内联函数
内联函数头文件.h
//内联函数头文件.h
#ifndef DEMO_H
#define DEMO_H
#include<string>
//带有inline的函数叫内联函数(执行速度快)(短小的函数)
inline int sum(int a, int b)
{
return a + b;
}
inline const std::string& shortString(const std::string& s1, const std::string&
原创
2020-11-30 21:50:55 ·
165 阅读 ·
0 评论