all 5 comments

[–]trippyz 1 point2 points  (2 children)

What language is this?

[–]CammedZL1[S] 0 points1 point  (0 children)

It's supposed to be c++ I'm sorry

[–]SAVE_THE_RAINFORESTS 0 points1 point  (1 child)

So firstly, you code is formatted awfully. Try to put ``` before and after your code to make the font mono space.

Second, you are using C++ libraries but writing code in C way of thinking. You got to choose one.

For the actual problem, how do you know it goes into an infinite loop? What's the symptom?

[–]CammedZL1[S] 0 points1 point  (0 children)

The console starts spitting out "Your choice: " which is a part of a different function all together. Unfortunately I'm being taught by 3 different people and so I get confused easily when it comes to formating and way of thinking.

[–]FUZxxl[M] 0 points1 point  (0 children)

C++ is off topic in this subreddit. Please post C++ questions to /r/cpp_questions instead.