Skip to content

Commit 94b1b22

Browse files
author
Joe Gibson
authored
Merge pull request gibsjose#26 from mgoutham/patch-1
Update C++ Syntax.md
2 parents e65b72e + 21faa44 commit 94b1b22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

C++ Syntax.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ Copy constructors and copy assigment operators allow one object to be constructe
514514
```c++
515515
Foo a(10);
516516
Foo b(a); // (1): Copy via constructor
517-
Foo c = a; // (2): Copy via assignment operator
517+
Foo c ;
518+
c = a; // (2): Copy via assignment operator
518519
```
519520
520521
This is accomplished by supplying a copy constructor and an assigment operator overload, both of which have a special syntax

0 commit comments

Comments
 (0)