I have this in my file and I wanted to read only the char and store them in array rankF[26]. My problem is skipping the even lines while reading the file. Any help would be great. Thanks!
This is my current code (without skipping lines):
int a=0;
if (inputFile){
while(inputFile >> alpha){
rankF[a] = alpha;
a++;
}
Use a string and read the even line in them.
string noUse;
int a=0;
if (inputFile){
while(inputFile >> alpha){
rankF[a] = alpha;
a++;
inputFile >> noUse;//This will read even lines input.
}