Skip to content

Instantly share code, notes, and snippets.

View BloodmageThalnos's full-sized avatar
🚩
Capturing objective

Cheng Yuan BloodmageThalnos

🚩
Capturing objective
View GitHub Profile
@ipid
ipid / heap_var.hpp
Last active May 30, 2019 10:58
Define variables on the heap but use them like stack variables. Heap variables have never been so simple to use.
#pragma once
#ifndef HEAP_VAR_HPP
#define HEAP_VAR_HPP
/*
Introduction:
In order not to cause a stack overflow, sometimes you must define
large objects on the heap. But heap variables are somewhat hard to use.
@johntyree
johntyree / OUTPUT
Last active November 24, 2023 08:27
C++ TRACE and LOG macros.
TRACE: /dev/shm/test.cpp(27): int main(int, char**)
TRACE: /dev/shm/test.cpp(20): void where_am_I(int)
LOG: /dev/shm/test.cpp(22): void where_am_I(int)
x(3) is odd.
LOG: /dev/shm/test.h(10): void where_are_you()
Here I am!