This commit is contained in:
xliu79
2020-07-19 10:38:38 +08:00
parent 9f6088a31e
commit 2bdeea85d1
129 changed files with 5264 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#include<stdio.h>
struct Base { // public
int v1;
// public: //error
int v2;
//private:
int v3;
//void print(){ // c中不能在结构体中嵌入函数
// printf("%s\n","hello world");
//}; //error!
};
void Base(){
printf("%s\n","I am Base func");
}
//struct Base base1; //ok
//Base base2; //error
int main() {
struct Base base;
base.v1=1;
//base.print();
printf("%d\n",base.v1);
Base();
return 0;
}