-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
986 lines (557 loc) · 29.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>
<head>
<meta charset="UTF-8">
<link rel="apple-touch-icon" sizes="76x76" href="/img/awesomeface.png">
<link rel="icon" href="/img/awesomeface.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="theme-color" content="#2f4154">
<meta name="author" content="周洪锋">
<meta name="keywords" content="">
<meta property="og:type" content="website">
<meta property="og:title" content="周洪锋的博客">
<meta property="og:url" content="http://zhouhf.top/index.html">
<meta property="og:site_name" content="周洪锋的博客">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="周洪锋">
<meta name="twitter:card" content="summary_large_image">
<meta name="referrer" content="no-referrer-when-downgrade">
<title>周洪锋的博客</title>
<link rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />
<!-- 主题依赖的图标库,不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->
<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">
<link rel="stylesheet" href="/css/main.css" />
<link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
<link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
<script id="fluid-configs">
var Fluid = window.Fluid || {};
Fluid.ctx = Object.assign({}, Fluid.ctx)
var CONFIG = {"hostname":"zhouhf.top","root":"/","version":"1.9.0","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};
if (CONFIG.web_analytics.follow_dnt) {
var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
}
</script>
<script src="/js/utils.js" ></script>
<script src="/js/color-schema.js" ></script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-math@4.0.0/dist/style.css">
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.0.0"></head>
<body>
<header>
<div class="header-inner" style="height: 100vh;">
<nav id="navbar" class="navbar fixed-top navbar-expand-lg navbar-dark scrolling-navbar">
<div class="container">
<a class="navbar-brand" href="/">
<strong>周洪锋的博客</strong>
</a>
<button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<div class="animated-icon"><span></span><span></span><span></span></div>
</button>
<!-- Collapsible content -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto text-center">
<li class="nav-item">
<a class="nav-link" href="/">
<i class="iconfont icon-home-fill"></i>
首页
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/archives/">
<i class="iconfont icon-archive-fill"></i>
归档
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/categories/">
<i class="iconfont icon-category-fill"></i>
分类
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/tags/">
<i class="iconfont icon-tags-fill"></i>
标签
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about/">
<i class="iconfont icon-user-fill"></i>
关于
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/links/">
<i class="iconfont icon-link-fill"></i>
友链
</a>
</li>
<li class="nav-item" id="search-btn">
<a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
<i class="iconfont icon-search"></i>
</a>
</li>
<li class="nav-item" id="color-toggle-btn">
<a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle"> <i
class="iconfont icon-dark" id="color-toggle-icon"></i> </a>
</li>
</ul>
</div>
</div>
</nav>
<div id="banner" class="banner" parallax=true
style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
<div class="full-bg-img">
<div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
<div class="banner-text text-center fade-in-up">
<div class="h2">
<span id="subtitle" data-typed-text="西郊有密林,助君出重围"></span>
</div>
</div>
<div class="scroll-down-bar">
<i class="iconfont icon-arrowdown"></i>
</div>
</div>
</div>
</div>
</div>
</header>
<main>
<div class="container nopadding-x-md">
<div id="board"
style="margin-top: 0">
<div class="container">
<div class="row">
<div class="col-12 col-md-10 m-auto">
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<i class="index-pin iconfont icon-top" title="Pin on top"></i>
<a href="/2022/06/12/%E5%8D%9A%E5%AE%A2%E8%B5%84%E6%96%99%E4%B8%8B%E8%BD%BD%E9%93%BE%E6%8E%A5%E7%B4%A2%E5%BC%95/" target="_self">
博客资料下载链接索引
</a>
</h1>
<a class="index-excerpt" href="/2022/06/12/%E5%8D%9A%E5%AE%A2%E8%B5%84%E6%96%99%E4%B8%8B%E8%BD%BD%E9%93%BE%E6%8E%A5%E7%B4%A2%E5%BC%95/" target="_self">
<div>
思维导图 均为个人复习资料,正确性无法保证,敬请包容,也欢迎指出。 软件 毛概答题助手 毛概答题助手2.0(带GUI版) 大三上 l离散数学思维导图 大二下 计算机组成原理2022 计算机通信与网络2022 UPD(2022-6-13): 蹭了节复习课,根据其他老师的复习目录修改了一点点内容。增加了绪论章节的思维导图。 操作系统2022 大作业 计算机数据lyn大作业
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2022-06-12 23:43" pubdate>
2022-06-12
</time>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2024/07/22/html-css%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" target="_self">
html+css学习笔记
</a>
</h1>
<a class="index-excerpt" href="/2024/07/22/html-css%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" target="_self">
<div>
众所周知,前后端的就业已经是强弩之末,但是作为科班的学生,不能对前后端的开发一点都不熟悉。所以,我利用暑假时间浅学习前端的知识,也算是为将来开发自己的个人网站作铺垫。 HTML学习笔记 HTML相对好理解,毕竟是所见即所得的东西,并且HTML的语法又与之前学的WPF非常相似,所以很多东西就不再往这里写了。对于HTML中存在的大量标签类型,也只要在开发时上网查询即可。 嵌套、内联元素与块元素 部
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2024-07-22 14:56" pubdate>
2024-07-22
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E5%89%8D%E7%AB%AF/" class="category-chain-item">前端</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/%E5%89%8D%E7%AB%AF/">#前端</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2024/06/03/two-interesting-things/" target="_self">
轶事两则
</a>
</h1>
<a class="index-excerpt" href="/2024/06/03/two-interesting-things/" target="_self">
<div>
轶事两则 起因是我和父母视频电话时抱怨毕设难度大,他们就说找个机会去文昌阁求一下神明保佑,我也没当回事。后来,解决了“结构体越界”这个bug后(这个bug我花了三个礼拜才解决),我就打电话和他们说了这件事,我妈才说就在4月21日(还是20日,忘了),他和我爸一起去了文昌烧香,结果第二天(如上图,4月22日)就遇到了高人指点。这多少让我这个无神论者有一些震惊。我妈还自豪地和我说,虽然有些事她不懂,
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2024-06-03 14:22" pubdate>
2024-06-03
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E9%9A%8F%E7%AC%94/" class="category-chain-item">随笔</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/%E9%9A%8F%E7%AC%94/">#随笔</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2024/05/30/RUDP/" target="_self">
毕设回顾——轻量可靠传输协议的设计与实现
</a>
</h1>
<a class="index-excerpt" href="/2024/05/30/RUDP/" target="_self">
<div>
许久未写博客,一方面是因为三四月份都在忙于毕设,每天都在查资料和debug,几乎挤不出时间来写blog,另一方面主要还是因为犯懒了。这次就一次性写一篇技术+心得向的文章,来总结一下这两个月毕设的工作。 仓库地址:https://github.com/zhf999/ReliableUDP 选题与准备 因为研究生导师让我跟着本校导师做毕设,所以我也就只能自己选题。最开始选了很多和密码学、信息安全有关
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2024-05-30 12:42" pubdate>
2024-05-30
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E8%AE%BA%E6%96%87/" class="category-chain-item">论文</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/">#计算机网络</a>
<a href="/tags/Linux%E5%86%85%E6%A0%B8/">#Linux内核</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2023/12/27/Summary2023/" target="_self">
2023年度总结————迷茫与探索
</a>
</h1>
<a class="index-excerpt" href="/2023/12/27/Summary2023/" target="_self">
<div>
转眼一年又这么过去了,时间真如白驹过隙,上次写年度总结仿佛还在昨天。现在打开Typora写下2023的年度总结,总觉得很多话要说,却不知道从何说起。今年算是度过了一整个GAP year,这应该会是我人生中最自由快乐的一段时光吧(真的吗?)。回忆当初建立博客的原因,一方面因为希望能留下学习笔记以便今后复习,另一方面是受我室友一句话的影响,原话是什么不记得了,但是大体的意思是”写博客的意义不在于别的,
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-12-27 19:52" pubdate>
2023-12-27
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E9%9A%8F%E7%AC%94/" class="category-chain-item">随笔</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/%E9%9A%8F%E7%AC%94/">#随笔</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2023/12/24/RUDP-paper-read/" target="_self">
RUDP论文阅读笔记
</a>
</h1>
<a class="index-excerpt" href="/2023/12/24/RUDP-paper-read/" target="_self">
<div>
毕设的选题是《轻量可靠传输协议的设计与实现》,在开始做之前读几篇论文,了解一下相关的研究背景。这篇博客的内容就是将各篇论文的重点研究部分摘出来,以便自己之后的研究和实现。 Reliable user datagram protoco [1]Thammadi, Abhilash. "Reliable user datagram protocol (RUDP)." (2011).
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-12-24 13:40" pubdate>
2023-12-24
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E8%AE%BA%E6%96%87/" class="category-chain-item">论文</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/%E7%AC%94%E8%AE%B0/">#笔记</a>
<a href="/tags/%E8%AE%BA%E6%96%87%E9%98%85%E8%AF%BB/">#论文阅读</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2023/11/16/C-%E8%AF%AD%E8%A8%80%E9%AB%98%E7%BA%A7%E7%89%B9%E6%80%A7/" target="_self">
C++语言高级特性
</a>
</h1>
<a class="index-excerpt" href="/2023/11/16/C-%E8%AF%AD%E8%A8%80%E9%AB%98%E7%BA%A7%E7%89%B9%E6%80%A7/" target="_self">
<div>
C++是一门很高深的语言,曾经上高中学了“C with STL”就以为自己学会了C++,实际上只是管中窥豹。如今捧起《C++ primer plus》拜读,才知道自己的渺小。C++的语言特新甚至还不断随着新标准的发布而更新。这篇博客会概括一下C++11之前的高级语言特性。由于这些高级用法过于尖端,实际使用到的很少,所以各个版块之间也毫无关联,权当走马观花,简单了解一些,以致于在看到别人写的代码时不
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-11-16 13:59" pubdate>
2023-11-16
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/" class="category-chain-item">编程语言</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/C/">#C++</a>
<a href="/tags/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/">#编程语言</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2023/11/13/C-%E6%A8%A1%E6%9D%BF%E7%B1%BB/" target="_self">
C++类模板
</a>
</h1>
<a class="index-excerpt" href="/2023/11/13/C-%E6%A8%A1%E6%9D%BF%E7%B1%BB/" target="_self">
<div>
一个容器(队列、栈、链表)只能存储指定类型的对象(当然,基类指针容器可以用于存放派生类的对象),这就给编程带来很大的不便。我们希望我们能够编写一个其存储对象可变的容器,此时类模板就派上了用场。 类模板的简单使用 声明语法如下: 12template <class Type> // in older compilertemplate <typename Type> // i
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-11-13 14:59" pubdate>
2023-11-13
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/" class="category-chain-item">编程语言</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/C/">#C++</a>
<a href="/tags/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/">#编程语言</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2023/11/05/C-%E7%B1%BB%E7%9A%84%E7%BB%A7%E6%89%BF/" target="_self">
C++类的继承
</a>
</h1>
<a class="index-excerpt" href="/2023/11/05/C-%E7%B1%BB%E7%9A%84%E7%BB%A7%E6%89%BF/" target="_self">
<div>
公有继承 实现公有继承 1234class RatedPlayer: public TableTennisPlayer&#123; // ... &#125;; 上面的代码实现了一个公有继承。派生类继承了基类的私有部分,但是只能通过派生类的公有方法来访问。 构造派生类 派生类不能访问基类的私有成员,所以要通过基类公有的构造函数来完成基类部分的构造。可以在派生类的构造函数后使用成员初始化列表
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-11-05 11:12" pubdate>
2023-11-05
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/" class="category-chain-item">编程语言</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/C/">#C++</a>
<a href="/tags/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/">#编程语言</a>
</div>
</div>
</article>
</div>
<div class="row mx-auto index-card">
<article class="col-12 col-md-12 mx-auto index-info">
<h1 class="index-header">
<a href="/2023/11/01/c-%E4%B8%AD%E7%9A%84%E5%90%84%E7%B1%BB%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0/" target="_self">
c++中的各类构造函数、类型转换和赋值
</a>
</h1>
<a class="index-excerpt" href="/2023/11/01/c-%E4%B8%AD%E7%9A%84%E5%90%84%E7%B1%BB%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0/" target="_self">
<div>
本篇博客讨论C++中的各种构造函数,包括列表初始化、隐式/显式构造函数、类的自动转换和强制转换、复制构造函数,还会顺带提一下相关的重载赋值运算符和返回值优化。 构造函数 最简单的构造函数就是使用类名作为构造函数的名称(无返回值),但是构造函数签名可以有多种,以表示对其重载。如果类中没有定义构造函数,编译器就会提供一个空的默认构造函数。 123456789Stock::Stock(const st
</div>
</a>
<div class="index-btm post-metas">
<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-11-01 22:56" pubdate>
2023-11-01
</time>
</div>
<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>
<span class="category-chains">
<span class="category-chain">
<a href="/categories/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/" class="category-chain-item">编程语言</a>
</span>
</span>
</div>
<div class="post-meta">
<i class="iconfont icon-tags"></i>
<a href="/tags/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/">#编程语言</a>
<a href="/tags/c/">#c++</a>
</div>
</div>
</article>
</div>
<nav aria-label="navigation">
<span class="pagination" id="pagination">
<span class="page-number current">1</span><a class="page-number" href="/page/2/#board">2</a><a class="page-number" href="/page/3/#board">3</a><span class="space">…</span><a class="page-number" href="/page/5/#board">5</a><a class="extend next" rel="next" href="/page/2/#board"><i class="iconfont icon-arrowright"></i></a>
</span>
</nav>
</div>
</div>
</div>
</div>
</div>
<a id="scroll-top-button" aria-label="TOP" href="#" role="button">
<i class="iconfont icon-arrowup" aria-hidden="true"></i>
</a>
<div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">搜索</h4>
<button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body mx-3">
<div class="md-form mb-5">
<input type="text" id="local-search-input" class="form-control validate">
<label data-error="x" data-success="v" for="local-search-input">关键词</label>
</div>
<div class="list-group" id="local-search-result"></div>
</div>
</div>
</div>
</div>
</main>
<footer>
<div class="footer-inner">
<div class="footer-content">
<a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a>
</div>
<div class="statistics">
<span id="busuanzi_container_site_pv" style="display: none">
总访问量
<span id="busuanzi_value_site_pv"></span>
次
</span>
<span id="busuanzi_container_site_uv" style="display: none">
总访客数
<span id="busuanzi_value_site_uv"></span>
人
</span>
</div>
</div>
</footer>
<!-- Scripts -->
<script src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
<link rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />
<script>
NProgress.configure({"showSpinner":false,"trickleSpeed":100})
NProgress.start()
window.addEventListener('load', function() {
NProgress.done();
})
</script>
<script src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script src="/js/events.js" ></script>
<script src="/js/plugins.js" ></script>
<script src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
<script>
(function (window, document) {
var typing = Fluid.plugins.typing;
var subtitle = document.getElementById('subtitle');
if (!subtitle || !typing) {
return;
}
var text = subtitle.getAttribute('data-typed-text');
typing(text);
})(window, document);
</script>
<script src="/js/img-lazyload.js" ></script>
<script src="/js/local-search.js" ></script>
<script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>
<!-- 主题的启动项,将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script src="/js/boot.js" ></script>
<noscript>
<div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
</noscript>
</body>
</html>