I'm reading through Programming Principles and Practice 2ed. and in the Hello World program, they use a line, keep_window_open()
.
Before finding this book, I learned the same Hello World program, but instead using system("PAUSE")
.
My questions are as follows:
- Are
keep_window_open()
andsystem("PAUSE")
effectively the same thing, or are they different? - If they are basically the same in function, then is there a reason to use one over the other? If so, when and why?
- If they are different, then is
keep_window_open()
deprecated in favor ofsystem("PAUSE")
, or vice versa? (Simpler terms: which would be preferred for regular use?) - If
keep_window_open()
is still in use, is it a part of thestd
namespace, to where it would need to be written asstd::keep_window_open()
in order to be used withoutusing namespace std;
?