system("PAUSE") or not system("PAUSE") | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

system("PAUSE") or not system("PAUSE")

Should we use it?, why?

24th Jul 2018, 1:37 AM
Carlos Ponticelli
Carlos Ponticelli - avatar
4 Answers
+ 8
You shouldn't, because you have the getchar() alternative, which is standard and does what you want without system() calls.
24th Jul 2018, 1:51 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
sometimes u have to wait for user to read content Ur displaying so we use pause syntax. but keep in mind that this will not work with Linux. idk about Mac.
24th Jul 2018, 2:18 AM
Yugabdh
Yugabdh - avatar
+ 1
Yes, I use Linux. I also think that the better is to use an alternative. getchar() works, but when I tried it, I have to double it, couse the buffer was full. getchar(); getchat();
24th Jul 2018, 2:37 AM
Carlos Ponticelli
Carlos Ponticelli - avatar
+ 1
I had used getchar () once in my program before that getchar syntax I used fgets () and it skipped getchar() :/
25th Jul 2018, 4:27 AM
Yugabdh
Yugabdh - avatar