摘要:
void create(ListNode *l,int a[]) { l->val = a[0]; ListNode *pnew,*ptemp = l;//指针temp 用于指向当前结点 for (int i =1; i <s+1; i++) { //将值一个一个插入单链表中 cout<<"l->v 阅读全文
posted @ 2022-04-20 17:41
Dsad123FFFG6645
阅读(31)
评论(0)
推荐(0)
摘要:
如果类C 继承自类A类B,且AB中都有函数f 则调用c.f时根据继承的先后顺序确定调用哪个类中的f class A( ): def f(self): print("A卖茶叶蛋...")class B( ): def f(self): print("B卖茶叶蛋...")class C( B,A): d 阅读全文
posted @ 2022-04-20 16:52
Dsad123FFFG6645
阅读(54)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode *next =NULL; ListNode() : val(0), next(nullptr) {} ListNode(int x) : 阅读全文
posted @ 2022-04-20 16:22
Dsad123FFFG6645
阅读(51)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> #define M1AX(a,b) (a>b)?a:b using namespace std; int main(){ int a = M1AX(3,4); cout<<a;//可以输出4 cout<< M1AX(3,4);//不可以可以输出4,原因 阅读全文
posted @ 2022-04-20 14:57
Dsad123FFFG6645
阅读(82)
评论(0)
推荐(0)
摘要:
c++ new 与malloc有什么区别 - ywliao - 博客园 (cnblogs.com) ElemType* pnew = new ElemType;// 会出错 ElemType* pnew;//不会出错C++中用new和不用new 定义类的对象的区别 不用new 是创建对象,自动在栈上 阅读全文
posted @ 2022-04-20 10:37
Dsad123FFFG6645
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号