I\'m needing help in adding commas to the number the user enters, some guidance or help would be appreciated. So far I have it where i store the first three digits and the l
Is this what you need? The locale will do this for you correctly.
#include
using namespace std;
int main ( int argc, char * argv[] )
{
unsigned long long userInput;
int fthreeDigit;
cout << "Enter a long long number: " << endl;
cin >> userInput;
std::cout.imbue(std::locale(""));
std::cout << userInput << std::endl;
return 0;
}