Apr 30th, 2007, 10:58 AM
#1
Thread Starter
Frenzied Member
It's crap.
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.
Attached Images
Apr 30th, 2007, 11:24 AM
#2
Apr 30th, 2007, 11:27 AM
#3
Re: It's crap.
Did you deliberately write that to take up as many lines of code as possible? If so, good job
I don't live here any more.
Apr 30th, 2007, 11:33 AM
#4
Thread Starter
Frenzied Member
Re: It's crap.
Originally Posted by
wossname
Did you deliberately write that to take up as many lines of code as possible? If so, good job
Sorry, forget to mention my screen supports 1280x1024 max.
Also, Wossy, can you suggest a better way? I'm a complete n00b when it comes to things like character replacement.
Apr 30th, 2007, 11:49 AM
#5
Re: It's crap.
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);
}
Last edited by wossname; Apr 30th, 2007 at 11:54 AM .
I don't live here any more.
Apr 30th, 2007, 12:00 PM
#6
Fanatic Member
Re: It's crap.
Originally Posted by
wossname
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.
"X-mas is 24.Desember you English morons.." - NoteMe
Apr 30th, 2007, 12:05 PM
#7
Thread Starter
Frenzied Member
Re: It's crap.
Originally Posted by
dsheller
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.
Jokes on him, it actually helped me
Apr 30th, 2007, 12:05 PM
#8
Re: It's crap.
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.
I don't live here any more.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width