fork download
  1. template <typename T> void func(const char* str, T val=T(0));
  2.  
  3. int m()
  4. {
  5. func<int>("Hello");
  6. }
  7.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int m()’:
prog.cpp:6: warning: control reaches end of non-void function
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
/home/bl98fv/ccroHO5g.o: In function `m()':
prog.cpp:(.text+0x13): undefined reference to `void func<int>(char const*, int)'
collect2: ld returned 1 exit status
stdout
Standard output is empty