Hello,
I'm having quite a hard time getting around this access violation error I keep getting. Every time I declare a character string in a structure I can never access it. Here's a small example of my code that keeps giving me a error no matter what I try.
struct _inputCH{
char str[15];
char input[20];
int data;
}inputCH[10];
BOOL newInput(struct _inputCH *currentInput){
CHAR lpBuffer[200];
printf("Enter something in:");
gets(lpBuffer);
//Accesses Violation 0xC00000005(dst = bad ptr)
memcpy(¤tInput->input, &lpBuffer, strlen(lpBuffer)+1);
return TRUE;
}
int main(){
...
newInput(&inputCH[0]);
...
return 0;
}
Thanks,
-A2H