I'm getting an access violation from this code:
Code:
cout<<card[x].name
<<setw(30-namelen)<<setprecision(0)<<'%'
<<card[x].interestRate
<<setw(10)<<setprecision(2)<<'$'
<<card[x].balance<<std::flush
<<setw(10-balancelength(card[x].balance))<<'$'
<<adjbal(card[x].balance,card[x].interestRate)<<endl;
The program stops output right before the second '$', and in debugging sends me to streambuf, line 130:
Code:
char_type _M_pback[_S_pback_size];
theres some comments a few lines above:
Code:
// Necessary bits for putback buffer management. Only used in
// the basic _filebuf class, as necessary for the standard
// requirements. The only basic _streambuf member function that
// needs access to these data members is in_avail...
// NB: pbacks of over one character are not currenly supported
I tried flushing the stream, but that didn't help... without debugging, the program runs to that point and gets killed by windows... I dont' really even know what this is trying to tell me, so I brought my question here...