Design Pattern Examples
Overview of object-oriented design patterns
helpers/_countof.h
Go to the documentation of this file.
1
#ifndef ___COUNTOF_H__
2
#define ___COUNTOF_H__
3
4
#include <stdlib.h>
5
// On Windows, stdlib.h contains a definition of _countof().
6
// On Linux, this definition does not exist so we need to add one.
7
#ifndef _countof
8
#define _countof(w) (sizeof(w) / sizeof((w)[0]))
9
#endif
10
11
#endif
// ___COUNTOF_H__
c
helpers
_countof.h
Generated on Tue Aug 29 2023 19:47:44 for Design Pattern Examples by
1.9.6