locked
ios::flags RRS feed

  • Question

  • Hi, I am brand new to C++, and my teacher has given an assignment which he wants us to display values in scientific 'e' notation, but with an uppercase 'E'. He mentioned an ios::uppercase flag, which I can't get to work. Can anyone help me?
    Here is what I've got so far.

    #include <ios>

    cout.setf(ios::uppercase) << my_value << endl;

    I followed an example I found almost exactly, but the setf statement causes about 20 errors. I'm writing a Win32 console application using the visual studio.net 2003 compiler.

    thanks in advance,

    smtraber
    Sunday, September 4, 2005 1:58 AM