我正在尝试编写一个程序,该程序从文件中读取字符串列表,并检查第二个文件中缺少哪些字符串并将它们打印到屏幕上。但是,我目前在尝试编译时遇到错误。以下是我在尝试编译以及代码时遇到的错误。感谢您的帮助
这是代码:
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
using namespace std;
ifstream IN_FILE;
ofstream OUT_FILE;
int main() {
int k = 0;
int m = 0;
int n = 0;
string a[5000];
string b[5000];
string filename;
bool good;
//open file and check if valid entry
cout << "\n\nWhat is the name of the first file (ex: filename.txt)\n" << endl << "FILENAME: ";
getline(cin, filename);
IN_FILE.open(filename);
while(!IN_FILE) {
cout << "Sorry the file you entered could not be opened\n"; …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 VBA 读取一系列单元格并将它们存储在一个数组中,然后我要将数组中的所有空白单元格更改为 0。但是,我不断收到越界错误这就是我到目前为止。
PercentComplete = Range("E3:E149").Value
For i = 1 To 147
If IsEmpty(PercentComplete(i)) Then
PercentComplete(i) = 0
End If
Next i
Run Code Online (Sandbox Code Playgroud)