Review Questions
1: | What storage scheme would you use for the following situations?
|
2: | Discuss the differences between a using-declaration and a using-directive. |
3: | Rewrite the following so that it doesn't use using-declarations or using-directives.
#include <iostream> using namespace std; int main() { double x; cout << "Enter value: "; while (! (cin >> x) ) { cout << "Bad input. Please enter a number: "; cin.clear(); while (cin.get() != '\n') continue; } cout << "Value ... |
Get C++ Primer Plus, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.