I am wondering why the cin.get();is there at all. why is it there, when I ran it it my virus protection came up and said it was a threat, but i took the cin statement out and it ran fine no problem at all, so, why, why is it there at all?
> I am wondering why the cin.get();is there at all
To make the program wait till the user types in something. Useful, if the program is run in a new terminal window, and without it the window would close instantly.
> when I ran it it my virus protection came up and said it was a threat,
> but i took the cin statement out and it ran fine no problem at all
I agree, but I'm talking about BEGINNER programming, and a beginner wouldn't need to worry about malicious software in their applications would they? or is there a virus that attacks new .exe's as you create them? or is it sooooo slow that it would be bad for a beginner to learn? I learned it as a beginner and I don't use it anymore so I don't see why not learn it and when it is unnecessary no longer use it, it is not hard to un-learn
> a beginner wouldn't need to worry about malicious software in their applications would they?
> or is there a virus that attacks new .exe's as you create them?
> or is it sooooo slow that it would be bad for a beginner to learn?
Programming is a lot easier if one cultivates good habits. And cultivating good habits early is a lot easier than breaking out of bad habits later. Learning x, unlearning x later, and then learning y is a lot harder than learning y in the first place.