|
-
June 4th, 2012, 09:11 PM
#9
Re: Using this XOR encryption in C++
 Originally Posted by qwerz
Uhm yes I see the difference, but I have no idea why it would be dangerous.
Are you saying that the difference between
char p[] and char *p is that char p[] is really a char array while the first one is a string-literal and not writable?
Yes. Why not try the small program and see what happens? Depending on the compiler you're using, the code that uses the string-literal will immediately crash on the assignment to p[0].
Regards,
Paul McKenzie
Last edited by Paul McKenzie; June 4th, 2012 at 09:14 PM.
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
|