Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- template <typename t> void f(t arg) {
- printf("general!\n");
- }
- void f(float* arg) {
- printf("specific!\n");
- }
- int main(int argc, char* argv[]) {
- f(1.0);
- float fl;
- f(&fl);
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement