I have a CUDA search function which calculate one single variable. How can I return it back.
__global__
void G_SearchByNameID(node* Node, long nodeCount, long start,char* dest, long answer){
answer = 2;
}
cudaMemcpy(h_answer, d_answer, sizeof(long), cudaMemcpyDeviceToHost);
cudaFree(d_answer);
for both of these lines I get this error: error: argument of type "long" is incompatible with parameter of type "const void *"