Support Forums
small question - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Programming with C++ (https://www.supportforums.net/forumdisplay.php?fid=20)
+---- Thread: small question (/showthread.php?tid=1365)



small question - h4ck3d- - 10-12-2009

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.


RE: small question - Akshay* - 10-13-2009

@ h4ck3d-

Can you Please tell that what's the correct problem you are having.


RE: small question - dongblues - 10-13-2009

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


RE: small question - Etheryte - 10-13-2009

If you want to make something impossible to read, use gotos. Enough said.


RE: small question - h4ck3d- - 10-13-2009

it's ok thanks for the help, he figured out what he had to do.


RE: small question - Cppsean - 10-14-2009

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.


RE: small question - MrD. - 10-15-2009

And if you want an example of what obfuscated code looks like, feel free to check out the TrueAxis source code.


RE: small question - Jimmyg22 - 10-20-2009

Code:
int main ()
{
     Top:
     printf ("Hello world");
     printf ("\n");
     goto Top;
}