This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#ifdef _WIN32 | |
#include <windows.h> | |
#else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int a; // a evaluates to int -> a is an int | |
int *a; // *a (dereferencing) evaluates to int -> a is a pointer to int | |
int a(); // a() evaluates to int -> a is a function that returns int | |
int *a(); // () has higher precedence ≃ int *(a()) -> deref a() evaluates to int -> a is a function that returns pointer to int | |
int (*a)(); // (*a)() evaluates to int -> a is a pointer to function that returns int | |
int a[10]; // a[i] evaluates to int -> a is an array of 10 integers | |
int *a[10]; // [] has higher precedence ≃ int *(a[10]) -> deref a[i] evaluates to int -> a is an array of 10 pointers to int | |
int (*a)[10]; // (*a)[i] evaluates to int -> a is a pointer to an array of 10 integers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=g++ | |
EXT=cpp | |
OPT= | |
DBG= | |
WARNINGS=-Wall -Wextra -Wsign-conversion -Wconversion | |
STD=-std=c++17 | |
DEPFLAGS=-MP -MD | |
DEF= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define ENUM_GEN(ENUM) ENUM, | |
#define STRING_GEN(STRING) #STRING, | |
// Add all your enums here | |
#define LIST_RET_T(RET_T) \ | |
RET_T(RET_SUCCESS) \ | |
RET_T(RET_FULL) \ | |
RET_T(RET_EMPTY) \ |