📄 10iv.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 + -