language: C++ 4.7.2 (gcc-4.7.2)
date: 153 days 18 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <cstring>
 
void foo(const void* input, char output[1024])
{
    std::strcpy(output, (const char *)input); // just an example implementation
}
 
int main()
{
    char* output_buf = new char[1024];
    foo("asdf", output_buf); // Compiler Error C2664
    std::cout<<output_buf;
    delete[] output_buf;
    return 0;
}