请问,在.net中iostream的cout与cin与6.0相比,在格式上有了什么变化?请受累把cout与cin的格式写下来,最好能带中文注解。除此之外,还有哪些常用的请句与6.0不一样,请各位高手帮帮了,谢谢!

解决方案 »

  1.   

    Example
    // iostream_cerr.cpp
    // compile with: /EHsc
    // By default, cerr and clog are the same as cout
    #include <iostream>
    #include <fstream>using namespace std;void TestWide( ) 
    {
       int i = 0;
       wcout << L"Enter a number: ";
       wcin >> i;
       wcerr << L"test for wcerr" << endl;
       wclog << L"test for wclog" << endl;   
    }int main( ) 
    {
       int i = 0;
       cout << "Enter a number: ";
       cin >> i;
       cerr << "test for cerr" << endl;
       clog << "test for clog" << endl;
       TestWide( );
    }
    Input
    3
    1
    Sample Output
    Enter a number: 3
    test for cerr
    test for clog
    Enter a number: 1
    test for wcerr
    test for wclog