Skip to content

Instantly share code, notes, and snippets.

@Colk-tech
Last active May 13, 2021 00:11
Show Gist options
  • Save Colk-tech/396036818222cc466b141310b3be2a47 to your computer and use it in GitHub Desktop.
Save Colk-tech/396036818222cc466b141310b3be2a47 to your computer and use it in GitHub Desktop.
学校の授業でよく使うマクロをまとめたテンプレートです。
//
// Created by Manaki ITO on 2021/05/07.
//
#include <stdio.h>
#include <stdlib.h>
#define print_green(...) {printf("\x1b[32m"); printf(__VA_ARGS__); printf("\x1b[39m\n");}
#define print_yellow(...) {printf(" \x1b[33m"); printf(__VA_ARGS__); printf("\x1b[39m\n");}
#define print_error(...) {fprintf(stderr, "\x1b[31m"); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\x1b[39m\n");}
#define fatal(exit_code, ...) {print_error(__VA_ARGS__); exit(exit_code);}
#define blank() {printf("\n");}
int main() {
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment