fork download
  1.  
  2. template<class underlying>
  3. underlying muldiv(underlying lhs, underlying times, underlying divide) {
  4. return 0;
  5. }
  6.  
  7. template<>
  8. int muldiv<int>(int lhs, int times, int divide) {
  9. return (int)(long long(lhs)*long long(times)/long long(divide));
  10. }
  11.  
  12. int main() {return muldiv(3, 4, 5);}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘underlying muldiv(underlying, underlying, underlying) [with underlying = int]’:
prog.cpp:9: error: expected primary-expression before ‘int’
prog.cpp:9: error: expected `)' before ‘int’
stdout
Standard output is empty