*shrug*
I really need to find a new forum...
Your English description is correct. (I'm not talking about your latest description either.) Your code has a bug. (A bug that was described to you in detail.)
[Edit]
I'll just save us both the trouble. Is `original' really producing correct results relating to your goal?
[/Edit]
Soma
Code:
#include <cstdlib>
#include <iostream>
char original
(
unsigned int x
)
{
// unchanged
if (x < 26) x += 'A';
else x += 'a';
return(char(x));
}
char correct
(
unsigned int value_f
)
{
if(26 > value_f)
{
return(char(value_f + 'A'));
}
else
{
return(char(value_f + 'a' - 26));
}
}
int main()
{
for(int x(0); 52 > x; ++x)
{
std::cout << correct(x) << ':' << original(x) << '\n';
}
return(0);
}