Project in C++ Skill Tree

Finding Notes by Keyword

Build a reusable C++ note search with relative-path identities, an ASCII word index and document-level AND queries that return every matching note and real source lines.

ProjectC++

Introduction

Finding Notes by Keyword is a practical C++ project for learners who know the language basics. Turn a few remembered words into a reusable local search tool that finds every matching note across folders and shows where the words actually occur.

The course combines two Guided Labs with one independent Challenge. First, connect words to document identities in an index. Then combine query words to find all documents containing them. Finally, apply the same rules to a different notebook collection. Each lab supplies its own notes and starter code; it does not depend on files from an earlier environment.

What You Will Learn

After completing this course, you will be able to:

  • identify documents by relative path, keeping same-named files in different folders distinct;
  • build a word-to-document-set index with map and set, without duplicating a document for repeated words;
  • apply a defined whole-word rule based on ASCII letters and ignore ASCII letter case;
  • combine candidate sets with AND to return every document containing all query words;
  • report actual paths, line numbers and original matching lines without duplicated line results;
  • rebuild from current practice notes by rerunning the program while preserving the reference originals.

Who This Course Is For

This course is for C++ learners who want to use standard containers and file input to build a useful search program with clear, testable rules.

Prerequisites: Basic terminal navigation and familiarity with C++ strings, functions, vector, file streams and basic exceptions. The Guided Labs introduce the required map and set operations, relative-path identities and set intersection.

Learning environment: LabEx provides a prepared browser-based Linux environment with a C++17 compiler, starter code, note collections and Terminal. File loading, tokenization and output formatting support are prepared. Commands and program messages use English; note filenames and text retain their supplied content.

Frequently Asked Questions

Must all query words appear on the same line?

No. AND applies to each whole document. Different words can occur on different lines. The result shows every original line containing any query word, once, so you can locate the evidence yourself.

Does this search understand every language?

The word rule is limited to runs of ASCII letters, with ASCII uppercase converted to lowercase; other bytes separate tokens. cat and catalog are different words. Unicode filenames and original line text are preserved, but the project does not provide general multilingual word segmentation.

How do changed notes enter the index?

Each program invocation rereads the current files and builds a fresh in-memory index. Rerun it after editing, adding or deleting a permitted practice note. The reference originals stay unchanged; there is no persistent index or background refresh service.

Teacher

labby
Labby
Labby is the LabEx teacher.

Recommended For You

no data