I am pretty new to c++ and I am trying to make a program that prints out the number based on user input. But when you add a ,
it breaks the code since it is not part of integers. What should I do?
I made a simplified code because I want to do more with the integers:
#include <iostream>
using namespace std;
int main(){
int player_input;
cout << "Insert the number" << endl;
cin >> player_input;
cout << player_input;
return 0; //the code doesn't work if you add a comma in cin when you run such as "3,500"
}