K
kittykat
Hi,
could someone please check my code? its asking the user to enter 3
letters, and check to see if these letters exist in the text file. i know
ive done something wrong. can someone fix my code please??
#include <fstream>
#include <string>
#include<iomanip>
#include <iostream>
#include<istream>
#include <cstdlib>
using namespace std;
int main()
{
char a, b, c;
ifstream myFile("data.txt");
cout << "Enter the pattern you are searching for: ";
cin.getline >> a & b & c;
cout << "Program will now search for: " << a << b << c << endl;
return 0;
}
could someone please check my code? its asking the user to enter 3
letters, and check to see if these letters exist in the text file. i know
ive done something wrong. can someone fix my code please??
#include <fstream>
#include <string>
#include<iomanip>
#include <iostream>
#include<istream>
#include <cstdlib>
using namespace std;
int main()
{
char a, b, c;
ifstream myFile("data.txt");
cout << "Enter the pattern you are searching for: ";
cin.getline >> a & b & c;
cout << "Program will now search for: " << a << b << c << endl;
return 0;
}