Examples: Code Blocks

The following should render with standard C/C++ highlighting.

void with_standard_code_block()

A function with an unannotated code block with C/C++ code.

char* buffer = new char[42];
int charsAdded = sprintf(buffer, "Tabs are normally %d spaces\n", 8);

The following should render with no detected highlighting.

void with_unannotated_cmake_code_block()

A function with an unannotated code block with non-C/C++ code.

set(user_list A B C)
foreach(element ${user_list})
    message(STATUS "Element is ${element}")
endforeach()

Another code-block that explicitly remains not highlighted.

Show this as is.

The following should render with specified cmake highlighting.

void with_annotated_cmake_code_block()

A function with an annotated cmake code block.

set(user_list A B C)
foreach(element ${user_list})
    message(STATUS "Element is ${element}")
endforeach()