H
harry
Hi all
I am putting a code snippet
#include "stdio.h"
#include "conio.h"
struct base{
int i;
char c;
};
struct der{
base b;
};
void FillUp(der *ptr)
{
ptr->b.i=10;
ptr->b.c=65;
}
int _tmain(int argc, _TCHAR* argv[])
{
der d;
FillUp(&d);
getch();
return 0;
}
I have a similar model in a bigger project. I am seeing some kind of
stack corruption. The value of "c" is not getting written to the
address at d.b.c when the function is called. Can anyone give me some
inputs abt when such a thing is possible?...or maybe point me to a link
where i can read about some stack issues.
thank you in advance...
Harry
I am putting a code snippet
#include "stdio.h"
#include "conio.h"
struct base{
int i;
char c;
};
struct der{
base b;
};
void FillUp(der *ptr)
{
ptr->b.i=10;
ptr->b.c=65;
}
int _tmain(int argc, _TCHAR* argv[])
{
der d;
FillUp(&d);
getch();
return 0;
}
I have a similar model in a bigger project. I am seeing some kind of
stack corruption. The value of "c" is not getting written to the
address at d.b.c when the function is called. Can anyone give me some
inputs abt when such a thing is possible?...or maybe point me to a link
where i can read about some stack issues.
thank you in advance...
Harry