69 620
Assignments Done
Successfully Done
In February 2019

Answer to Question #57943 in C++ for mabswhale

Question #57943
How to count number of entries in a txt file ?
Expert's answer
int main() {
int number_of_lines = 0;
std::string line;
std::ifstream inpFile("file.txt");
while (std::getline(inpFile, line))
std::cout << "Number of lines in text file: " << numberOfLines;
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions