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,33 +1,20 @@
/**
* @file friend_func.cpp
* @brief 友元函数
* @author 光城
* @version v1
* @date 2019-08-06
*/
#include <iostream>
using namespace std;
class A
{
class A {
public:
A(int _a):a(_a){};
friend int geta(A &ca); ///< 友元函数
A(int _a) : a(_a){};
friend int geta(A &ca); ///< 友元函数
private:
int a;
int a;
};
int geta(A &ca)
{
return ca.a;
}
int geta(A &ca) { return ca.a; }
int main()
{
A a(3);
cout<<geta(a)<<endl;
int main() {
A a(3);
cout << geta(a) << endl;
return 0;
return 0;
}