I get this error in a c code of mine
error C2440: '=' : cannot convert from 'LPVOID' to 'unsigned char *
if((buffer = HeapAlloc(
GetProcessHeap(),
HEAP_ZERO_MEMORY,
totalBufferSize
)) == NULL) {
fprintf(stderr, "Memory allocation error\n");
ExitProcess(1);
}
and even this
error C2440: '=' : cannot convert from 'unsigned char *' to 'LPSTR'
blocks = (WAVEHDR*)buffer;
buffer += sizeof(WAVEHDR) * count;
for(i = 0; i < count; i++) {
blocks[i].dwBufferLength = size;
blocks[i].lpData = buffer;
buffer += size;
}
How do I solve this? I get in windows using visual tudio 2008.I have already turned off unicode setting.