fork download
  1. #include <iostream>
  2.  
  3. template <typename T>
  4. void assignment(T* result, size_t sz, const T x)
  5. {
  6. for (size_t i = 0; i < sz; i++)
  7. result[i] = x;
  8. }
  9.  
  10. int main()
  11. {
  12. double d[10];
  13. assignment(d,sizeof(d),0.0);
  14. return 0;
  15. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty