Hey there, my code is nearly perfect, but I need help with my input for a value. here's the snippet of my code:

cout << setw(15) << right <<"$" ;
            double Amount;
            input >> Amount;
            cout.setf(ios::showpoint);
            cout.setf(ios::fixed);
            cout.precision(2);
            cout.width(8);      
        input.ignore();
        cout << Amount << endl;

i know that input puts a space after itself, and thats throwing off my output, how would i use getline instead of input?

** side note, im doing this on an online compiler, and its difficult to make changes (intellisense doesn't kick in)

why are you using an online compiler? There are several free compilers that you can download and compile on your computer, assuming you are using your own computer instead of one located in some public place like a library or at school.

I'm at work, andd can't install anything, hence the online compiler; but this can be closed and marked as resolved, I fixed the issue and it works fine :) thanks Dragon

This question has already been answered. Start a new discussion instead.