[Message Deleted] [modified]
-
I have created a structure as typedef struct __test{ char buf[10]; }TEST,*PTEST; then i created a CList object as CListmy_firststruct; then i am using to store linklist if( my_firststruct.IsEmpty()) my_firststruct.Addhead(pTest); else my_firststruct.AddTail(pTest); It is working fine. But problem start when i am using as typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; if(pTest->my_secondstruct.IsEmpty()) when i am trying to call this is giving me error error code is C0000005: This error is with memory. So how i will resolve this error. Can any one help me on this...? -- modified at 9:41 Wednesday 27th September, 2006
-
I have created a structure as typedef struct __test{ char buf[10]; }TEST,*PTEST; then i created a CList object as CListmy_firststruct; then i am using to store linklist if( my_firststruct.IsEmpty()) my_firststruct.Addhead(pTest); else my_firststruct.AddTail(pTest); It is working fine. But problem start when i am using as typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; if(pTest->my_secondstruct.IsEmpty()) when i am trying to call this is giving me error error code is C0000005: This error is with memory. So how i will resolve this error. Can any one help me on this...? -- modified at 9:41 Wednesday 27th September, 2006
-
I have created a structure as typedef struct __test{ char buf[10]; }TEST,*PTEST; then i created a CList object as CListmy_firststruct; then i am using to store linklist if( my_firststruct.IsEmpty()) my_firststruct.Addhead(pTest); else my_firststruct.AddTail(pTest); It is working fine. But problem start when i am using as typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; if(pTest->my_secondstruct.IsEmpty()) when i am trying to call this is giving me error error code is C0000005: This error is with memory. So how i will resolve this error. Can any one help me on this...? -- modified at 9:41 Wednesday 27th September, 2006
GudduRanchi wrote:
...please help me
With what? :confused: You've failed to indicate any problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
GudduRanchi wrote:
...please help me
With what? :confused: You've failed to indicate any problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
I have created a structure as typedef struct __test{ char buf[10]; }TEST,*PTEST; then i created a CList object as CListmy_firststruct; then i am using to store linklist if( my_firststruct.IsEmpty()) my_firststruct.Addhead(pTest); else my_firststruct.AddTail(pTest); It is working fine. But problem start when i am using as typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; if(pTest->my_secondstruct.IsEmpty()) when i am trying to call this is giving me error error code is C0000005: This error is with memory. So how i will resolve this error. Can any one help me on this...?
-
What is the error you are facing with struct XXXX{ CListmy_second_Struct; char buff[10]; char buff1[10]; }YYY; ?? Rinu Raj
I have created a structure as typedef struct __test{ char buf[10]; }TEST,*PTEST; then i created a CList object as CListmy_firststruct; then i am using to store linklist if( my_firststruct.IsEmpty()) my_firststruct.Addhead(pTest); else my_firststruct.AddTail(pTest); It is working fine. But problem start when i am using as typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; if(pTest->my_secondstruct.IsEmpty()) when i am trying to call this is giving me error error code is C0000005: This error is with memory. So how i will resolve this error. Can any one help me on this...?
-
I have created a structure as typedef struct __test{ char buf[10]; }TEST,*PTEST; then i created a CList object as CListmy_firststruct; then i am using to store linklist if( my_firststruct.IsEmpty()) my_firststruct.Addhead(pTest); else my_firststruct.AddTail(pTest); It is working fine. But problem start when i am using as typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; if(pTest->my_secondstruct.IsEmpty()) when i am trying to call this is giving me error error code is C0000005: This error is with memory. So how i will resolve this error. Can any one help me on this...?
I'm not sure what the problem is. This worked fine for me:
typedef struct __Second
{
char buf[10];
} SECOND, *PSECOND;typedef struct __test
{
CList< PSECOND,PSECOND> my_secondstruct;
char buf[10];
} TEST, *PTEST;PTEST pTest = new TEST;
if (pTest->my_secondstruct.IsEmpty())
;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
I'm not sure what the problem is. This worked fine for me:
typedef struct __Second
{
char buf[10];
} SECOND, *PSECOND;typedef struct __test
{
CList< PSECOND,PSECOND> my_secondstruct;
char buf[10];
} TEST, *PTEST;PTEST pTest = new TEST;
if (pTest->my_secondstruct.IsEmpty())
;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
Hi What you have suggested it is good.it works fine but ? i am giving you total my problem. I am having two structure. as you kmow. typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; CListmy_example; i have created an object of PTEST as: PTEST test; Allocating an memory. Filled this structure. check (my_example.Isempty()){ // This is my First Node my_example.AddHead(test); } In this condition i am getting problem if i am alocating the memory of PTEST my_example= new TEST; them i am not able to call all the member variable of CList. So what i have to resolve my problem Regards and Thanks Neeraj Kumar Jha
-
Hi What you have suggested it is good.it works fine but ? i am giving you total my problem. I am having two structure. as you kmow. typedef struct __Second{ char buf[10]; }SECOND,*PSECOND; typedef struct __test{ CListmy_secondstruct; char buf[10]; }TEST,*PTEST; CListmy_example; i have created an object of PTEST as: PTEST test; Allocating an memory. Filled this structure. check (my_example.Isempty()){ // This is my First Node my_example.AddHead(test); } In this condition i am getting problem if i am alocating the memory of PTEST my_example= new TEST; them i am not able to call all the member variable of CList. So what i have to resolve my problem Regards and Thanks Neeraj Kumar Jha
GudduRanchi wrote:
PTEST my_example= new TEST;
You can't do this because
my_example
is aCList
object. The compiler should have warned you of such.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb