D
duramax
Hi,
I'm getting some weird results for the following code:
#include "stdafx.h"
#include <stdlib.h>
typedef struct ALLO
{
char a[3];
char b[4];
} Allo;
int _tmain(int argc, _TCHAR* argv[])
{
Allo al;
strcpy(al.a, "aloe");
strcpy(al.b, "vcxzv");
return 0;
}
I get an error "stack around arround the 'al' variable was corrupted". I
think that strcpy in this case isn't good but I can't realy tell... If it is
how could I set my char in my structure else than with strcpy?
TIA, Max.
I'm getting some weird results for the following code:
#include "stdafx.h"
#include <stdlib.h>
typedef struct ALLO
{
char a[3];
char b[4];
} Allo;
int _tmain(int argc, _TCHAR* argv[])
{
Allo al;
strcpy(al.a, "aloe");
strcpy(al.b, "vcxzv");
return 0;
}
I get an error "stack around arround the 'al' variable was corrupted". I
think that strcpy in this case isn't good but I can't realy tell... If it is
how could I set my char in my structure else than with strcpy?
TIA, Max.