⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iword.cpp

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 CPP
字号:
#include <iostream.h>
#include <strstream.h>

void main( void ) {

    int       index1, index2;
    float     dollar1, dollar2;
    char      ch;

    istrstream     currency ( "23.4 26.6" );
    index1 = currency.xalloc();
    currency.iword( index1 ) = 36;
    index2 = currency.xalloc();
    currency.iword( index2 ) = 157;
    currency >> dollar1;
    currency >> dollar2;
    cout << "Canadian currency: CAN " << ( ch = currency.iword( index1 ) )
         << dollar1 << endl;
    cout << "Japanese currency: " << ( ch = currency.iword( index2 ) )
         << dollar2 << endl;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -