首页 > 代码库 > run C source file like a script

run C source file like a script

TinyCC http://bellard.org/tcc linux 平台”C-script”: 哈哈

#!/usr/local/bin/tcc -run#include <stdio.h>#include <stdlib.h>double fac(double n){  if (n <= 0.0) return 1;  return n * fac(n - 1);}int main(int argc, char* argv[]){  if (argc != 2) {    printf("Usage: %s <number>\n", argv[0]);    return -1;  }}

 

 

run C source file like a script