Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

//! [0] C++ - what is it?

Tags:

c++

directive

what does //! [0] do in C++? I believe it's something that changes the language defaults, like turning off lazy evaluation or something, but I don't know exactly. Something with arrays?

like image 954
styrofoam fly Avatar asked Jun 07 '13 21:06

styrofoam fly


People also ask

What is 0 degrees C called?

Celsius, also called centigrade, scale based on 0° for the freezing point of water and 100° for the boiling point of water.

Is 0 C colder or warmer than C?

You can get colder than 0°C, however, since 0°C is just the freezing point of water. So, to arrive at the frigid forecast above I simply converted the first figure to an absolute temperature scale (the Kelvin scale), halved it and then converted it back to Celsius.

Are 0 C and F the same?

Answer: 0 °Celsius is equivalent to 32 °Fahrenheit. Let's look into the conversion between Celsius and Fahrenheit scales. Explanation: The formula to convert Celsius to Fahrenheit is given by ºF = ºC × (9/5) + 32. Given that, C = 0.


Video Answer


1 Answers

That's a comment of course. Still it has a special meaning for doxygen:

\snippet ( block_id )

Where the \include command can be used to include a complete file as source code, this command can be used to quote only a fragment of a source file.

For example, the putting the following command in the documentation, references a snippet in file example.cpp residing in a subdirectory which should be pointed to by EXAMPLE_PATH.

\snippet snippets/example.cpp Adding a resource

The text following the file name is the unique identifier for the snippet. This is used to delimit the quoted code in the relevant snippet file as shown in the following example that corresponds to the above \snippet command:

QImage image(64, 64, QImage::Format_RGB32);
image.fill(qRgb(255, 160, 128));
//! [Adding a resource]
document->addResource(QTextDocument::ImageResource,
    QUrl("mydata://image.png"), QVariant(image));
//! [Adding a resource]
...

Note that the lines containing the block markers will not be included, so the output will be:

document->addResource(QTextDocument::ImageResource,
QUrl("mydata://image.png"), QVariant(image));

Note also that the [block_id] markers should appear exactly twice in the source file.

Here 0 is the block id.

like image 65
Lol4t0 Avatar answered Oct 03 '22 23:10

Lol4t0