Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #31.8K
The example in this post is from** C++ Primer Plus (6th Edition)** by *Stephen Prata* **My question:** Why cin.ignore( ) is not used in his example? Shouldn't we discard the buffer with a line similliar to this: `std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');` Example from the book: int fill_array(double ar[], int limit) { using … |
|
Hi. I'm trying to use brace-initialization notation: int number{}; But I get the following error: "expected an expression". Shouldn't c++11 allow this kind of initialization? int number2(4) works just fine. Thank you. |