Employers: discover CodinGame for tech hiring
Practice
Compete
1
Contribute
Learn
1
Log In
Sign Up
quiz copy constructor
Anonymous
1,327 views
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include
<
iostream
>
struct
A
{
A() : val() {}
A(
int
v) : val(v) {}
A(A a) : val(a.val) {}
int
val;
};
int
main(
int
argc,
char
** argv)
{
A a1(
5
);
A a2(a1);
std::cout << a1.val + a2.val << std::endl;
return
0
;
}
Run
0
0
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
Suggested playgrounds
Quiz 66
By
Unnamed contributor
1,463
0
0
user-defined conversion
By
Unnamed contributor
1,418
2
1
Correct the code to display 'Hello World!'
By
SJTECollege
1,699
85
1
Python Hello World program
By
SJTECollege
1,131
70
3
CodinGame - Home
ABOUT US
CAREERS
PRIVACY
FAQ
CodinGame - Work
The #1 tech hiring platform
SCREENING
SOURCING
RETAIN
ABOUT US
CAREERS
PRIVACY
FAQ
Facebook
YouTube
Twitter
LinkedIn
FR
EN
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants
Keyboard Shortcuts:
?
Show / hide this help menu
×