fork download
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. void foo(const void* input, char output[1024])
  5. {
  6. std::strcpy(output, (const char *)input); // just an example implementation
  7. }
  8.  
  9. int main()
  10. {
  11. char* output_buf = new char[1024];
  12. foo("asdf", output_buf); // Compiler Error C2664
  13. std::cout<<output_buf;
  14. delete[] output_buf;
  15. return 0;
  16. }
Success #stdin #stdout 0.02s 2856KB
stdin
Standard input is empty
stdout
asdf