Skip to main content

CPP Program to count words in a File

The below program is c++ program to count the number of words in a given input file. The program will take space character as a word separator. It is a very simple file handling program written in c++. It just reads the file path from the user and verifies whether the file is existed. If the file does not exist, the program simply gives a message "File does not exist". If the file is existed then it reads each character from the file and checks if the character is a space. If the character is a space then it would be counted as word and the counter variable will be incremented. Once the it reaches the end of the file, it will displays the total count of the words in the given file. 

Click here to know more about the project. 

 Visit Projects page of learningmela.com to download more projects.

Popular posts from this blog

Fun Facts

Do you want to improve your knowledge? Do you want to impress friends with some facts? Then Fun Facts app is for you. "Fun Facts" is an android app shows some quotes which are funny but real facts. Install the app @  https://play.google.com/store/apps/details?id=com.sonuappz.funfacts

Java program to create PDF files

The below is a program to create a PDF text file in Java language.   This program reads a line of text from user and the text will be written to a pdf file. The pdf file name also be taken from the user input. This is a console java program.   Click here   to know more about the project.    Visit  Projects  page of  learningmela.com  to download more projects.

Java Program to use LDAP server

The below is a java program to demonstrate how to use the LDAP server connection to validate a user authentication. To check the authentication using LDAP server we required the user id and its password. We need to create a context to the LDAP server before connecting to it. And also we required to know the field names in the LDAP server.   Click here   to know more about the project.    Visit  Projects  page of  learningmela.com  to download more projects.