Skip to main content

c-学习1

#1 基础知识 传送门

#2 编程环境 windows 与linux windows 不友好,采用wsl ubuntu

#3 案例 eg

hello.c

#include <stdio.h>

int main(){
printf("Hello,world! \n");
return 0;
}

understand.c

#include <stdio.h>
#include "myh/myh.h"

int main(void){
printf("understanding now \n");
myint = 10;
printf("%dis myint value \n",myint);
return 0;
}

myh/myh.h

int myint;
char mychar;

myc.sh

#!/bin/bash
gcc -v
gcc ./practice/hello.c -o ./o/hello
gcc ./WebBench/webbench.c -o ./o/webbench

运行 myc.sh 即可在o 目录下生成编译后的文件