support bazel complie this project and format code.

This commit is contained in:
zhangxing
2023-03-30 00:15:11 +08:00
committed by light-city
parent 1f86192576
commit 3c8a3f259b
641 changed files with 10349 additions and 9523 deletions

View File

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