fork(1) download
  1. #include <cstdio>
  2.  
  3. template<typename T>
  4. class Logger {
  5. public:
  6. void d(char const TAG, T value);
  7. };
  8.  
  9. template<typename T>
  10. void Logger<T>::d(char const TAG, T value) {
  11. char buffer[64];
  12. snprintf(buffer, sizeof(buffer), "%d", value);
  13. //__android_log_write(ANDROID_LOG_DEBUG, TAG, buffer);
  14. printf("%d", buffer);
  15. }
  16.  
  17. int main() {
  18. auto logger = new Logger<int>;
  19. logger->d('k', 123312);
  20. return 0;
  21. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
-1077638384