coderzaman / program-to-check-if-a-given-string-is-Keyword-or-not

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# C++ Keyword Validator

This C++ program allows you to check if a given string is a valid C++ keyword. It is designed to identify reserved words in the C++ language, ensuring that a user-inputted string does not conflict with these keywords.

## Usage:
1. Compile the program using a C++ compiler.
2. Run the compiled executable.
3. Enter a keyword when prompted.
4. The program will inform you whether the entered string is a valid C++ keyword or not.

## Code Structure:
- The array `keywords` in the code contains the complete list of C++ keywords.
- The function `isValidKeyword` checks if a given string matches any keyword in the array.
- User input is collected using `getline` for robust input handling.

## Sample Execution:

Please Enter your keyword: for
for is a valid keyword
  

Contribution

Contributions to this project are welcome. If you find issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.


Happy Coding!

About

License:MIT License


Languages

Language:C++ 100.0%