Please help me with string.

I need to make a string program that would determine if a string has all unique character. So when i enter any sentence, it will decided if there are any repeated letters in the sentence.
I know i need to use getline() for string to read and i need to use erase function to remove all the space in the string
Below is what i got so far and i need help improving it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <sting>

using namespace std; 

int main()
{
	bool isUnique(string);

int main(){
    bool uniq;
    string a;
    cout << "Please input a string, not a very long one...."<< endl;
    getline(cin, a);
    uniq = isUnique(a);
    if (uniq == true)
        {
            cout << "The string has no repeatations." <<endl;
        }else{
            cout << "The characters in the string are not unique." <<endl;
        }
    return EXIT_SUCCESS;


}
closed account (SECMoG1T)
bool isUnique(string);

please don't declare a function in main or might be a typo since I can see you got 2 main functions , correct that.
Also where is its definition. .. please provide
Last edited on
Topic archived. No new replies allowed.