User:Mgkrupa
From cppreference.com
Links
Code
Template:c (for inline code)
- {{c| 1=code| lang=language(optional)}}
- "intended to highlight code inline."
- Example:
{{c|std::string(80, '_');}}
results in std::string(80, '_'); - Example:
{{c|1= auto x = std::array{1, 2, 3};}}
results in auto x = std::array{1, 2, 3};
Template:source (for large blocks of code)
- {{source| 1=code| lang=language(optional)}}
- "intended to highlight large amounts of code."
- Example:
{{source|1=
int main()
{
__builtin_printf("Hello, C++\n");
}
}}
- results in
int main() { __builtin_printf("Hello, C++\n"); }