Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
No edit summary
Tags: Visual edit Mobile edit Mobile web edit
Line 19:
Example(int a, int b); // Parameterized constructor.
 
privateprate:
int x_;
int y_;
Line 26:
Example::Example() = default;
 
Example::Example(int x, int y) : x_(x), y_(y) {}
</syntaxhighlight>