fig13_03.cpp

来源:互联网 发布:手机桌面视频软件 编辑:程序博客网 时间:2024/06/14 01:02
#include<iostream>using namespace std;int main(){const char *const word = "again";cout << "Value of word is: " << word << endl<< "Value of static_cast< const void *>(word) is: "<< static_cast <const void *>(word) << endl;}


fig13_04.cpp

#include<iostream>using namespace std;int main(){int character;cout << "Before input, cin.eof() is " << cin.eof() << endl<< "enter a sentence followed by end-of-file:"<<endl;while ((character = cin.get()) != EOF)cout.put(character);cout << "\nEOF in this system is: " << character << endl;cout << "After input of EOF, cin.eof() is " << cin.eof() << endl;}


原创粉丝点击