Download Style Guidelines for Programming in C/C++
Transcript
Kelsey Lick : Programming : Example of C++ Style and Commenting
Navigate:
Style Guidelines for C/C++
Example of C++ Style and Commenting
Debugging Guidelines
Guidelines for Software Design
Program Documentation
Example of C++ Style and Commenting
//
//
//
//
//
//
Name
Login
Course
Lab Section Number
Program Name (as1, as2, lab1, ...)
Program Description
includes
prototypes
constants
void main()
{
variable declaration
variable declaration
// describe variable
// describe variable
// comment set of related statements
// if comment runs long, use two lines
statement 1
statement 2
// comment set of related statements
// if comment runs long, use two lines
statement 1
statement 2
// comment what the "if" does
if ( ... )
{
http://www.cs.ucr.edu/~klick/programming/style_comment.htm (1 of 2) [10/1/2000 8:13:18 PM]