(C++) Need to import the text from a notepad documentincluding a space. I already have the program, but it isskipping spaces.
The input needs to be stored in an array so that it canbe manipulated. The printing on main is to see if the program isstoring the spaces.
here is the program and input.
PROGRAM
#include <vector>
#include <iostream>
#include <string.h>
#include <fstream>
#include <cstdlib>
using namespace std;
ifstream in_stream;
string iarray[201];
int s = 0;
void readFromFile() {
in_stream.open(“Input7.txt”);
if (in_stream.fail()) {
cout << “failed to open. “;
exit(1);
}
while (!in_stream.eof()) {
in_stream >> iarray[s];
s++;
}
}
int main() {
readFromFile();
for (int i = 0; i < s; i=i++) {
cout << iarray[i];
}
return 0;
}
Input
Th
is
i (//THERE IS 1 SPACE before i)
s (//THERE IS 1
PayPal Gateway not configured
PayPal Gateway not configured