Skip to content

Cpp11 new features #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.
  • Loading branch information
Quarkblue committed Oct 25, 2022
commit b3345c27a4439e28514b501477898ecaae292a90
2 changes: 1 addition & 1 deletion Advanced-Cpp-Programming.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<ClInclude Include="Template Classes and Functions\Template-class.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Cpp%2711 New features\mutable-lambda.cpp" />
<ClCompile Include="Cpp%2711 New features\Delegating-constructors.cpp" />
<ClCompile Include="Operator Overloading\Complex.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced-Cpp-Programming.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<ClCompile Include="Operator Overloading\Complex.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Cpp%2711 New features\mutable-lambda.cpp">
<ClCompile Include="Cpp%2711 New features\Delegating-constructors.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
8 changes: 3 additions & 5 deletions Cpp'11 New features/Delegating-constructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Parent {
string text;

public:
Parent() {
Parent(): Parent("Hello") {
dogs = 5;
cout << "No parameter parent constructor" << endl;
}
Expand All @@ -26,16 +26,14 @@ class Parent {
class Child : public Parent {

public:
Child(): Parent("Hello") {

}
Child() = default;

};


int main() {

Parent parent;
Parent parent("Hello");
Child child;
return 0;

Expand Down