Compiler trouble

Pages: 12
closed account (Dy7SLyTq)
Using std::cin.ignore( std::numeric_limits< std::streamsize >::max() );

sorry thats the one i meant. like i said i havent used it in a while. still a lot safer than getch.

It is very irritating when a program ends its processing but would not terminate because it expects user input.
i agree but its better than using the terminal to keep it open

It is not a `dependency', we have other methods to solve the issue.

it is a dependency if you are depending on it to keep it open.

One of its responsibilities is to provide a testing environment.
im not saying it shouldnt, but writing the code to pause it yourself is a lot better than the ide injecting system("pause") (it might not be injecting it... idk the exact process) so you can see it at the end, like code::blocks for windows does
> i agree but its better than using the terminal to keep it open
Consider abnormal program termination, like exceptions or segfaults
Consider multiple exit points, like when you couldn't open a file.
If you execute the program inside a terminal you wouldn't have any issue in those cases.

> but writing the code to pause it yourself is a lot better than the ide injecting system("pause")
¿why should I have to dirty my code?
If the IDE is crap, get another IDE. It's that simple.

> the ide injecting system("pause") (it might not be injecting it... idk the exact process)
you may want to inform yourself then (read the source code of your IDE)
One method is to create a wrapper that would execute your code http://www.cplusplus.com/forum/beginner/1988/3/#msg14102
Topic archived. No new replies allowed.
Pages: 12