C++ Effective_02
来源:互联网 发布:dcn oracle python 编辑:程序博客网 时间:2024/06/06 07:40
#define ASPECT_RATIO 1.653
const double AspectRation = 1.653;
const char* const authorName = "Scott Meyers";
const std::string authorName("Scott Meyers");
class GamePlayer
{
private:
static const int NumTurns = 5;
int scores[NumTurns];
}
const int GamePlayer::NumTurns;
class CostEstimate{
private:
static const double FudgeFactor;
}
const double CostEstimate::FudgeFactor = 1.35;
class GamePlayer{
private:
enum { NumTurns = 5};
int scores[NumTurns];
}
#define CALL_WITH_MAX(a, b) f((a) > (b) ? (a) : (b))
int a = 5, b = 0;
CALL_WITH_MAX(++a, b);
CALL_WITH_MAX(++a, b+10);
template<typename T>
inline void callWithMax(const T& a, const T& b)
{
f(a > b ? a : b);
}
const double AspectRation = 1.653;
const char* const authorName = "Scott Meyers";
const std::string authorName("Scott Meyers");
class GamePlayer
{
private:
static const int NumTurns = 5;
int scores[NumTurns];
}
const int GamePlayer::NumTurns;
class CostEstimate{
private:
static const double FudgeFactor;
}
const double CostEstimate::FudgeFactor = 1.35;
class GamePlayer{
private:
enum { NumTurns = 5};
int scores[NumTurns];
}
#define CALL_WITH_MAX(a, b) f((a) > (b) ? (a) : (b))
int a = 5, b = 0;
CALL_WITH_MAX(++a, b);
CALL_WITH_MAX(++a, b+10);
template<typename T>
inline void callWithMax(const T& a, const T& b)
{
f(a > b ? a : b);
}
0 0
- C++ Effective_02
- c
- c
- c
- c
- C
- c
- c
- c
- C+
- c
- C
- c
- c
- c
- C
- C
- c
- Algorithms—222.Count Complete Tree Nodes
- VisualSVN错误 Cannot query proxy blanket解决办法
- Android wakelock 自上而下浅析
- 阿里DRC介绍 zt
- 几个重要的RedHat Linux内核文件介绍
- C++ Effective_02
- 项目tip
- Qt之设置窗口背景
- 自定义分页控件
- Sublime Text 的一些使用技巧 之 二
- 域名转发
- 工作周报061
- Zigbee中的PANID,CHANNEL,DEVICEID功能
- php+sqlrelay+mysql实现连接池及读写负载均衡