#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "util.h"
//example
int main(void) {
let(*n,int,10);
println("pointer: %p, value: %d",n,*n);
uintptr_t x;
x = n;
int *y = x;
println("pointer: %p, value: %d",y,*y);
return 0;
}
#ifndef UTIL_H
#define UTIL_H
//initialize pointer
#define new(type) (type*) malloc(sizeof(type));
//define a pointer and give it an initial value
#define let(var, type, val) type var = new(type); var = val
//like print but adds a newline
#define println(args...) printf(args); printf("\n")
#endif