No such file or directory

Hi,
Don't know why it isn't compiling for me could someone help me please and try to make it as easy as possible to understand

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  #include <iostream>


#include <string> 


using namespace std; 
char caesar( char ); 
int main() 

{ 
    string input; 

    do { 
        cout << "Type the message you want to code and then press enter" << endl; 
        cout << "Press enter again if you want to quit because you are boring" << endl; 
        getline(cin, input); 
        string output = ""; 
        for(int x = 0; x < input.length(); x++) 
        { 
            output += caesar(input[x]); 
        } 

        cout << output << endl; 

    } while (!input.length() == 0); 

}   
char caesar( char c ) 
{ 
    if( isalpha(c) ) 

    { 
        c = toupper(c); 
        c = (((c-65)+13) % 26) + 65; 
    } 

    return c; 
}
Last edited on
You are missing a } at the end of your program.
You are missing a return statement in main.
Topic archived. No new replies allowed.