FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Algorithm/2.2.1_2.cpp at master · Tanswer/Algorithm · GitHub
Tanswer
/
Algorithm
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Algorithm
/
2.2.1_2.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (25 loc) · 453 Bytes
Breadcrumbs
Algorithm
/
2.2.1_2.cpp
Copy path
File metadata and controls
32 lines (25 loc) · 453 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*
* @filename: 2.2.1_2.cpp
* @author: Tanswer
* @date: 2018年02月23日 13:40:56
* @description:
*/
#
include
<
iostream
>
using
namespace
std
;
class
A
{
public:
A
(
int
n) { value = n; }
A
(A other) { value = other.
value
; }
//
error 拷贝构造函数的参数必须是引用
void
Print
() { cout << value << endl; }
private:
int
value;
};
int
main
()
{
A a =
10
;
A b = a;
b.
Print
();
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL