Error : argument of type "int" is incompatible with parameter of type "const void *"
cuda
Solution
The second argument to `cudaMemcpy()` is wrong. It is meant to be a pointer (`const void*`) and you're supplying an `int`.
Did you mean to write:
cudaMemcpy(dev_array_length, &array_length, 1*sizeof(int), cudaMemcpyHostToDevice);
^
Problem
in this part of my code when compile program. this error show: "argument of type "int" is incompatible with parameter of type "const void *". i declare variable as follow: ``` int *dev_matrix, *dev_array, *dev_array_length; int array_length=1; cudaMalloc((void**)&dev_array_length, 1*sizeof(int)); cudaMemcpy(dev_array_length, array_length, 1*sizeof(int), cudaMemcpyHostToDevice); ```