
C++,C
书屋里的猫xk
书屋里的一只大懒猫
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++友元函数访问类的私有成员
工程中我们经常需要访问一些类的成员,添加一个友元函数可以达到我们的目的。#include <iostream>#include<cstring>using namespace std ;class Student{ private: string name; int age; int sore; public: Student(string name,原创 2017-09-14 15:23:59 · 4724 阅读 · 2 评论 -
手撸一个简单的单链表
//先手撸一个单链表#include<stdio.h>#include<stdlib.h>#include<string.h>typedef struct Table{ int chepai; char *driver; char *id_number; char *start_time; char *leave_time; struct Tab原创 2017-09-20 14:11:26 · 462 阅读 · 0 评论 -
C++友元函数访问类的私有成员
在一些工程中我们经常需要访问某些类的静态成员,添加一个友元函数可以达到我们的目的。#include <iostream>#include<cstring>using namespace std ;class Student{private:string name; int age; int sore;public:Student(string name,int age,i...原创 2018-03-05 10:49:32 · 5993 阅读 · 1 评论