joplin-notes/joplin notion extension/Web Development/C_C++/Syntax.md
2026-11-04 00:33:23 +05:30

13 lines
No EOL
180 B
Markdown

Syntax
- template
```cpp
template <typename T>
T add(T a, T b) {
return a + b;
}
add<float>(5.f, 1.5f);
add<int>(1, 2);
add(20, 40); // Automatically deduces int
```