#Mastery07

07 07 1017

Hi!

I am doing this mastery all over again because i wan to reach to 2 points.

I am teaching you how to put comments in c++.

Well first of all lets talk about why to use comments in codes? 

The answer is really simple, because sometimes you are making a code with other teammate or something like in the final project of Sudoku were you ra syncing with github, maybe the other guy modify somehting and you dont know what he had done so he put  a commento to et you know what does it mean.

Even if you´re alone the comments  will be useful when you want to try your program without a function or something but you are scared of deleting it, just put it as a comment an the problem is solved. Or when you don´t want to forget what you did or even when you are uploading to github, put a comment to let Ken know what is your doubt or what you´ve been doing.

With that said, lets see how does a comment is made.

There ar to kinds of comments

The first one is just by putting two slashes befor you write “//”, the perk of this comment is that you can only use it in one line.

The second one is to put slash and asterisc at the beginning “/*” and then asterisc and slash at the end “*/”, the good thing with this one is that you can use it in as many lines as you want.

Hope that this post is useful, enjoy it.

CC BY 4.0 #Mastery07 by Juan Carlos is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.