What is correct way of putting comments into code for C/C++...

What is correct way of putting comments into code for C/C++? It often makes me really annoyed because I use comments often as separators for larger chunks of code and it all gets messy. Simply writing //Something is terrible way of commenting something and so is multiline comment describing every little obvious bullshit.

Are you happy about how comments work in C/C++? Is it sufficient enough for you? Doesn't your code get ugly and messy? Any advice for me how to comment like white person and not MIT nigger?

If you would pick best syntax/style to write comments from any language, which one it would be?

Attached: c-programming-unit-2-basic-structure-of-a-c-program-17-638.jpg (638x479, 95.21K)

The proper thing to do is to handwrite a 1:1 copy of your code in a notebook, and put your comments on that, that way you can reference it, but any faggot that steals your code will be forced to come to Zig Forums and make a thread bitching about how people don't document their code.

sage

...

hmmm

/* This program is illustrating a preferred comment etiquette* and style.* This is public domain*//* Import C library */#include main( ){/* This will produce the phrase "Hello World" which will* be followed by a new line. This exits cleanly.*/ printf("hello, world\n");}

It's not that hard

//////////////////////////////////////////////////////////////loooooooooooooooooooooooooooooooool//////////////////////////////////////////////////////////////

Attached: .png (624x200, 205.25K)

#include void *main(void){ puts("\x6b\x65\x6b\x6b\x69\x74\x79\x20\x6b\x65\x6b\x0a"); return NULL;}

You're fine.
Just note:
//This is a C++ style comment. It should work on most modern C utilities and compilers, but many older C utils and compilers can't process them.
[code]/* This is a C style comment. All C compilers and utilities will support this no matter the age.[/spoiler]

/* ▒███▒ ███ █▓██ ░███░ █▒██▒ ░███░ █████ ███ █▒██▒ █▒ ░█ ▓▓ ▒█ █▓ ▓█ █▒ ▒█ ██ █ █▒ ▒█ █ █▓ ▓█ ██ █ █▒░ █ █ █ █ █ █ █ █ █ █ █ ░███▒ █████ █ █ ▒████ █ ▒████ █ █ █ █ ▒█ █ █ █ █▒ █ █ █▒ █ █ █ █ █ █░ ▒█ ▓▓ █ █▓ ▓█ █░ ▓█ █ █░ ▓█ █░ █▓ ▓█ █ ▒███▒ ███▒ █▓██ ▒██▒█ █ ▒██▒█ ▒██ ███ █ █ █ █ */

\x6b\x65\x6b\

It's not guaranteed how characters beyond 0x7f are going to be displayed (.nfo style shit generally relies on plain old codepage 437, use anything else and it'll look like random crap).

Pic related is a great example of self-documenting code where comments arent' necessary in the first place.

Attached: hurr_fizzbuzz.png (621x942, 34.22K)

Typically in the header file, I'll document each of the functions, there arguments, any restrictions, and return value. In the source file, functions are only commented if they have a complicated procedure to follow. Inside of functions comment things that aren't obvious in what you are doing. Finally, I like to break some functions up with an abstract description of what is trying to be done in the following code.
In addition to these comments, you should be writing "self documenting code."

That's not self documenting.

You put quotation marks around it to turn it into a no-op string literal.
That doesn't work if you already use string literals in your code but real programmers don't work with text anyway.

That's fucking perfect. You are hired. Welcome to the team

Attached: 15104322882630.jpg (750x562, 76.21K)

It was more of a LARP tbh, though it can be done in UTF8 as well as CP437.
It is simple to convert between codepages, either in the terminal display or file format itself.

Attached: stop.jpg (500x335, 18.7K)

what's the candy it looks really good but im allergic to peanuts

It's also a standard C99 comment. If your C compiler doesn't support a 19-year old language standard revision, you should seriously get a fucking new compiler.

how do you even use nigger emojis then

bump