(The latest version of this document is at "http://www.milkywaygalaxy.freeservers.com" . You may want to check there for changes).
Coding standards for C/C++ or any language is required in order to make the programs more readable/understandable by programmers. There are C/C++ beautifiers (formating tools) to accomplish this goal. Formatted (beautified) code improves the productivity of programmers by 2 times !!
On Linux/Unixes there is a command called "indent" and "cb" . Refer to 'man indent' and 'man cb'. Note that indent and cb work for only "C" programs. For "C++" programs use "bcpp" .
Important NOTE: To compile bcpp under unix, unpack bcpp.tar.gz and you MUST change directory to "code" and give a make. Do not change to "unix" directory and give a make. That will give lots of errors.
Download the beautifier program from one of the following
If you are having trouble downloading software from any of the sites below, then download for a small cost from my site at "http://www.milkywaygalaxy.freeservers.com" . The cost is very small to maintain this web site. Some of the free sites below are not maintained properly.
C++ : BCPP site is at "http://dickey.his.com/bcpp/bcpp.html" or at "http://www.clark.net/pub/dickey" . BCPP ftp site is at "ftp://dickey.his.com/bcpp/bcpp.tar.gz"
C : "http://www.chips.navy.mil/oasys/c/" and mirror at Oasys
C++ : "http://www.semdesigns.com/Products/DMS/DMSToolkit.html"
C++, C, Java and Oracle Pro-C Beautifier "http://www.geocities.com/~starkville/main.html"
C++, C beautifier "http://users.erols.com/astronaut/vim/ccb-1.07.tar.gz" and site at "http://users.erols.com/astronaut/vim/#vimlinks_src"
C++, C, Java, Perl beautifier CBP "http://www.prismtk.de/docs/cbp"
GC! GreatCode! is a powerful C/C++ source code beautifier Windows 95/98/NT/2000 "http://perso.club-internet.fr/cbeaudet"
CbVan for C, C++ and Java at "http://www.geocities.com/~starkville/main.html"
Artistic Style beautifier for C, C++, Java at "http://sourceforge.net/projects/astyle" "http://astyle.sourceforge.net" .
I used BCPP to format the C++ programs and it worked fine for me. You may want to check other tools and use the one which you may like the most.
BCPP was written by Steven De Toni at steve@alpha.ocbbs.gen.nz