0
char rotate(char c, int n);
{
int upper[] = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90};
int lower[] = {97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122};
int total = 0;
if (n > 25)
{
    n % 25;
}
if ((isalpha(c) && islower(c)))
{
    return upper[(int) c - 'A'];
}
else if ((isalpha(c) && islower(c)))
{
    return lower[(int) c - 'a'];
}
else
{
    return c;
}

}

The error happens at the first bracket on my code. I'm pretty confused because there isn't really any code there for there to be an error about. Thank you so much in advance for helping me out!

1 Answer 1

1

Of course it happens on the first bracket. If you're trying to create a function, you cannot have a semicolon between the end of the signature line and the first curly brace. To do so tells the compiler "This is what this function call should look like, code will be coming later."

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .