---
title: "Discussion on \"How to Reverse Only Letters and Vowels in a String Using C++\" | Hashnode"
description: "Discussion on \"How to Reverse Only Letters and Vowels in a String Using C++\". using namespace std;\n#include <iostream>\n#include <algorithm>\n#include <vector>\n\nstring reverseOnlyLetters(string s)\n{\n    int low = 0;\n    int high = s.size() - 1;\n\n    while (low < high)\n    {\n        if (isalpha(s[low]) && isalpha(s[high]))\n      ..."
url: "https://hashnode.com/posts/how-to-reverse-only-letters-and-vowels-in-a-string-using-c/668f60c99d2d05455ffee407"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Reverse Only Letters and Vowels in a String Using C++](https://jubairshaik.hashnode.dev/how-to-reverse-only-letters-and-vowels-in-a-string-using-c?utm_source=hashnode&utm_medium=feed)

using namespace std; #include <iostream> #include <algorithm> #include <vector> string reverseOnlyLetters(string s) { int low = 0; int high = s.size() - 1; while (low < high) { if (isalpha(s\[low\]) && isalpha(s\[high\])) ...

Jul 11, 2024 · 3 min read · jubairshaik.hashnode.dev  
Read the article

-   [#code](https://hashnode.com/tag/code)
-   [#cpp-ck4ra5k7300nlv2s1jbkdp2qh](https://hashnode.com/tag/cpp-ck4ra5k7300nlv2s1jbkdp2qh)
-   [#strings](https://hashnode.com/tag/strings)

## Written by

[Jubair Ahmed](https://hashnode.com/@jubairahmed1)

@jubairahmed1 · India

  
[View profile](https://hashnode.com/@jubairahmed1)

Full Stack Dev

Love to Build Fully Functional Apps and Websites

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
