Skip to content

Commit 5823096

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#2115 from ironick09/rename-member-function
Rename Box member function to more appropriately describe the function's behavior
2 parents ecd0976 + 7018cb7 commit 5823096

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/cpp/constructors-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public:
232232
}
233233
int Volume() { return m_width * m_height * m_length; }
234234
void Add_Item(string item) { m_contents.push_back(item); }
235-
void Get_Contents()
235+
void Print_Contents()
236236
{
237237
for (const auto& item : m_contents)
238238
{
@@ -262,7 +262,7 @@ int main()
262262
Box b1(b); // "copy"
263263
Box b2(get_Box()); // "move"
264264
cout << "b2 contents: ";
265-
b2.Get_Contents(); // Prove that we have all the values
265+
b2.Print_Contents(); // Prove that we have all the values
266266

267267
char ch;
268268
cin >> ch; // keep window open

0 commit comments

Comments
 (0)