Support Forums

Full Version: small question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
my friend needs help. he needs

3 bad examples of c++ code that makes something difficult to read or maintain

i guess anything thing goes would appreciate it if someone could help.
@ h4ck3d-

Can you Please tell that what's the correct problem you are having.
post the code of your friend.. but if he just wants everything hazy from other people.. put in a lot of comments and move all lines to the end of the screen.. that annoys people..

example..
__________________________________________________________#include<stdio.h>//qtrtqerwerqwesdfasdyyu dyutrfgdfh
___________________________#include<conio.h>//sdfsdafsd thre asfsdf trwe wer safa werwe rerqe rqwerqw sfaasdf erqw q
If you want to make something impossible to read, use gotos. Enough said.
it's ok thanks for the help, he figured out what he had to do.
Making the code VISUALLY hard to read has NOTHING to do with security, to a computer, its still decompileable, Examples below


#include <iostream>
int main()
{

cout << "Hello Their!";

}

#include <iostream>
int main() {
cout <<
"Hello their!"; }


Look up code obfuscator if you want it Assembly hard to read.
And if you want an example of what obfuscated code looks like, feel free to check out the TrueAxis source code.
Code:
int main ()
{
     Top:
     printf ("Hello world");
     printf ("\n");
     goto Top;
}