But i was messing and this happened... Notice the screen res...
EDIT: And i am aware it's not encryption it is simply character replacement.
Printable View
But i was messing and this happened... Notice the screen res...
EDIT: And i am aware it's not encryption it is simply character replacement.
so.. what's crap?
Did you deliberately write that to take up as many lines of code as possible? If so, good job :thumb:
Sorry, forget to mention my screen supports 1280x1024 max.Quote:
Originally Posted by wossname
Also, Wossy, can you suggest a better way? I'm a complete n00b when it comes to things like character replacement.
Code:void Encypher(char* orig)
{
char* cypher = "QWERTYUIOPASDFGHJKLZXCVBNM";
int len = 0;
char* out = NULL;
char* run = NULL;
char temp = ' ';
if(orig == NULL || orig[0] == '\0')
return;
len = strlen(orig);
run = out = (char*)malloc(len + 1);
while(len--)
{
temp = *orig++;
if(temp >= 'A' && temp <= 'Z')
temp = cypher[temp - 'A'];
*run++ = temp;
}
*run = '\0';
printf("%s\n", out);
free(out);
}
I guess you deliberately wrote it in C to be completely unhelpful to him, as he is using VB, yet at the same time prove your point. Kudos to you, if he wanted real help he should've known better than to post in chit-chat. :afrog:Quote:
Originally Posted by wossname
Jokes on him, it actually helped me :pQuote:
Originally Posted by dsheller
Full marks to dsheller.
It's not completely unhelpful, you could print it out, fold it up and use it to prop up a wobbly table leg.