Why doesn't this code output the number in octal format?
The output is 15, but it should be 17.Code:#include <iostream.h> #include <iomanip.h> int main () { cout << setiosflags(ios::oct) << 15 << endl; return 0; }
using just
works fine.Code:cout << oct << 15
Thanks.