Skip to content

Instantly share code, notes, and snippets.

View TokenGuard's full-sized avatar

Bence Babrian TokenGuard

View GitHub Profile
\newcommand{\lneg}[1]{\ensuremath{#1^{\bot}}}
\newcommand{\dlneg}[1]{\ensuremath{#1^{\bot\bot}}}
\newcommand{\parr}{\mathbin{⅋}}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef char* String; //From now on whenever the compiler sees "String" it knows it refers to a "char*"
int main(int argc, char* argv[]) {
String str1 = "Hello World!"; //Normal string syntax still works
String str2 = (String)malloc(50 * sizeof(char)); //Allocate 50 character's worth of bytes on the heap
//You ought to check the return vlaue for malloc()