Image

Imagepyro01 wrote in Imagecpp

I don't know if this is just me, but if you are going to submit code, please try minimizing the use of comments, or putting it on the same line as a code after whatever you did, so I can see all the code tegether in one line, and all the comments to the right of it, makes it a hell of a lot easier to look over. However, this might be just me. I understand how your teachers might require a hell of a lot of comments, but then why dont you make a _second_ file and remove all the comments from that one, except the ones that we actually need to help us figure out whats happening, and even it that case it makes it easier if you keep it on the same line as the code. Example:


int main() {               //main area of the code
   char me;                //this here creates a char variable named me
   while (1) {             //enters an infinite while loop
     cin << me;            //the user inputs a character to be put into the me variable
     if (me=='a') break;   //input will keep getting recieved until they type 'a'
   }                       //end of while loop
   return 1;               //everything worked fine
}                          //end of main 



is much better than 
int main() {  
   //main area of the code
   char me;
   //this here creates a char variable named me.
   while (1) { 
   //enters an infinite loop
     cin << me;
     //the user inputs a character to be put into the me variable
     if (me=='a') {
     //if the user finally entered a
        break;
        //exit out of the loop
     }
     //input will keep getting recieved until they type 'a'
   }
   //exiting the while loop
   return 1;
   //everything worked well
}
//the code is done


Edit: both of these sets of code are horrible, I know that, I would perfer that you stick to style of block commenting, I'm just saying that if you absolutley HAVE to comment every single line then put it somewhere else, like off to the side, so the people reading it don't have to struggle to understand whats going on, ironically enough.