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

📄 10iv.cpp

📁 《C/C++程序设计导论(第二版)》一书的程序源文件
💻 CPP
字号:
// InputAnswerKey()  Reads a disk file for a quiz answer key and
//  sets the correct answers in the array `answers'.
//  ASSUMPTION; input file exists and contains 5 answers
//  IN:		keyfile is a string for the input file name
//			size is the array size
//  	OUT:		answers is an array for the correct quiz answers
#include <fstream.h>
#include "Cstring.h"
void InputAnswerKey (String keyfile, char ans[ ], int size)
{	ifstream infile (keyfile, ios::in);
	for (int n=0; n<size; n++)			
		infile >> ans[n];
}

⌨️ 快捷键说明

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