Fork, Commit, Merge - Medium Issue 2 (C++)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start in tasks/c++/medium/text_file_parser/TextFileParser.cpp, and read the issue's requirements and example. The program should open input.txt from the working directory, lowercase words, skip a stop-word list, count frequencies, and sort by count. Build with g++ -o TextFileParser TextFileParser.cpp from that directory, then run ./TextFileParser. It is done when the example input prints the listed words with their counts, most frequent first. The issue does not say how ties should be ordered, so pick a rule and state it in the pull request.
Written by the indexing model from the issue text.
Description
Fork, Commit, Merge - Medium Issue 2 (C++)
Implement a Basic Text File Parser
Note: You don't have ask permission to start solving the issue or get assigned, since these issues are supposed to be always open for new contributors. The actions-user bot will reset the file back to previous state for the next contributor after your commit is merged. So you can just simply start working with the issue right away!
Navigate to the tasks/c++/medium/text_file_parser directory from the root of your project.
Open the TextFileParser.cpp file and start implementing your solution!
Description:
Create a C++ program that reads a text file and counts the frequency of each word in the file. The program should then output each word along with its corresponding count to the console, sorted by the most frequent words first.
Requirements:
- Read a file named
input.txt. - Ignore case (e.g., "The" and "the" are considered the same word).
- Exclude common English stop words (e.g., "the", "is", "at", "which", "on").
- Use standard C++ libraries only.
Example:
Given input.txt:
Hello world!
The world is a beautiful place.
The weather is wonderful.
Output should be:
world - 2
beautiful - 1
place - 1
weather - 1
wonderful - 1
hello - 1
Compiling and Running:
To test the program you have to first make sure you are in the right directory:
cd tasks/c++/medium/text_file_parser
Then compile the files:
g++ -o TextFileParser TextFileParser.cpp
Then you can run the compiled program by running:
./TextFileParser
If the program works as requested in the task, you are ready to make a pull request!
To work with this issue, you need to have C++ installed to your local machine.
Check out README.md for more instructions of installing C++ and how to make a pull request.
Feel free to ask any questions here if you have some problems!
Also, kindly give this project a star to enhance its visibility for new developers!
- Dominant language
- CSS
- Stars
- 511
- Forks
- 2.6k
- Avg merge
- 19h 9m
- Merged PRs (30d)
- 94
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fork-commit-merge/fork-commit-merge
-
first-contributor first-contributors good first issue javascript medium
Difficulty 1/5 Under an hour Newbie friendliness 72/100
fork-commit-merge/fork-commit-merge#8576 ·
Maintainers usually reply within 1 day
-
Fork, Commit, Merge - Easy Issue (Spring Boot)Possibly taken A pull request linked to this issue is open or already merged. Openeasy first-contributor first-contributors good first issue java maven spring spring-boot up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
fork-commit-merge/fork-commit-merge#8575 ·
Maintainers usually reply within 1 day
-
docker first-contributor first-contributors good first issue medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fork-commit-merge/fork-commit-merge#8574 ·
Maintainers usually reply within 1 day
-
first-contributor first-contributors good first issue help wanted javascript solidjs up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fork-commit-merge/fork-commit-merge#8571 ·
Maintainers usually reply within 1 day
-
first-contributor first-contributors good first issue help wanted javascript solidjs up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
fork-commit-merge/fork-commit-merge#8570 ·
Maintainers usually reply within 1 day
All issues in fork-commit-merge/fork-commit-merge
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
containers/bubblewrap#826 ·
Maintainers usually reply within 1 day
-
b:minor bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
software-mansion/argent#1771 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
area:fs type:fix
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Tripstack-Corp/spyc#1002 ·
Maintainers usually reply within 1 day
-
good first issue roadmap
Difficulty 2/5 1-3 hours Newbie friendliness 66/100