[Dev-C++] address 0x33313031 out of bounds
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <ma...@mm...> - 2002-12-12 05:51:29
|
i'm having a bit of a problem. i get to a particular line in my program and
i crashes no matter how i try and get it to work. the relevant code
basically goes.....
void func (char *type)
{
char key[10];
printf("type is currently %s", type);
sprintf(key, "last%s", type); //crashes at this point
printf("key is currently %s", key);
}
int main (int argc, char *argv[])
{
char type[3];
strcpy(type,argv[1]);
func(type);
}
if i watch type, after it crashes it tells me that address 0x33313031 is
out of bounds. i can't see that i'm doing anything wrong. what does the
error actually mean?
thanx in advance
|