iostream tag

3 questions


1 answers
143 views
0
std::endl, which one should I use, '\n'?

If you look at the C++ book,std::cout << Test line << std::endl;You shared a roomThe code that other people madestd::cout << Test line\n;There are more things that I wrote togetherWh...

1 years ago

1 answers
55 views
0
Why can't Iostream::eof be used in the loop?

I heard that writing iostream::eof in a conditional sentence is a bad ideaI usually write while(cin>>n) together and check EOF.But why can't I write iostream::eof myself and check it?From C scan...

1 years ago

1 answers
70 views
0
I want to print out the entire 'double' when I print out the cout

If I run the source code below,It says 3.14159265358979 instead of 3.14159Instead of rounding off the decimal point,What should I do to get the full price?int main(){ double d = 3.14159265358979; cout...


© 2024 OneMinuteCode. All rights reserved.