Click here to Skip to main content
15,919,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionthe problem about display the coordiate Pin
wangy27527-Apr-07 21:17
wangy27527-Apr-07 21:17 
AnswerRe: the problem about display the coordiate Pin
Rajesh R Subramanian27-Apr-07 21:45
professionalRajesh R Subramanian27-Apr-07 21:45 
Questiondraggable column marker Pin
Shivarudra Swamy27-Apr-07 21:01
Shivarudra Swamy27-Apr-07 21:01 
AnswerRe: draggable column marker Pin
Shivarudra Swamy27-Apr-07 21:03
Shivarudra Swamy27-Apr-07 21:03 
AnswerRe: draggable column marker Pin
PJ Arends28-Apr-07 6:50
professionalPJ Arends28-Apr-07 6:50 
QuestionUse ActiveX Object?! Pin
MohammadAmiry27-Apr-07 20:27
MohammadAmiry27-Apr-07 20:27 
AnswerRe: Use ActiveX Object?! Pin
MohammadAmiry27-Apr-07 23:59
MohammadAmiry27-Apr-07 23:59 
Questionstruct pointers Pin
ginjikun27-Apr-07 19:53
ginjikun27-Apr-07 19:53 
hi once again... tnx for the answers to my previous posts...

again i have another qxn to ask...
will the code below post any memory leak or any pointer problems?
i am unsure as how to write the code for a struct to have an indefinite size of array of structs inside it. so what i did is to just use a pointer and have a member which holds the size of the array pointed to. is there any efficient way to go about this? tnx a lot!

typedef struct
{
int number;
int number2;
} TEST, *LPTEST;

typedef struct
{
LPTEST pTest;
int number;
} TEST_CONT;

TEST test[2];
test[0].number = 123;
test[0].number2 = 45;
test[1].number = 678;
test[1].number2 = 910;

TEST_CONT testC;
testC.pTest = test;
testC.number = 98765;

int n = testC.pTest[0].number;
int n2 = testC.pTest[0].number2;
cout << n << " " << n2 << " " << testC.number << endl;

n = testC.pTest[1].number;
n2 = testC.pTest[1].number2;
cout << n << " " << n2 << " " << testC.number << endl;

newbie Smile | :)
AnswerRe: struct pointers Pin
Arman S.27-Apr-07 21:09
Arman S.27-Apr-07 21:09 
GeneralRe: struct pointers Pin
ginjikun28-Apr-07 3:28
ginjikun28-Apr-07 3:28 
QuestionHow to Append Two Byte Buffers?? Pin
narayanagvs27-Apr-07 19:49
narayanagvs27-Apr-07 19:49 
AnswerRe: How to Append Two Byte Buffers?? Pin
Arman S.27-Apr-07 21:11
Arman S.27-Apr-07 21:11 
AnswerRe: How to Append Two Byte Buffers?? Pin
John R. Shaw28-Apr-07 15:20
John R. Shaw28-Apr-07 15:20 
QuestionWM_DESTROY Pin
SumitMandal27-Apr-07 19:14
SumitMandal27-Apr-07 19:14 
QuestionRe: WM_DESTROY Pin
Rajesh R Subramanian27-Apr-07 19:28
professionalRajesh R Subramanian27-Apr-07 19:28 
AnswerRe: WM_DESTROY Pin
Stephen Hewitt27-Apr-07 20:49
Stephen Hewitt27-Apr-07 20:49 
AnswerRe: WM_DESTROY Pin
Michael Dunn28-Apr-07 18:50
sitebuilderMichael Dunn28-Apr-07 18:50 
QuestionFile Pin
Tran Ngoc Minh27-Apr-07 17:31
Tran Ngoc Minh27-Apr-07 17:31 
AnswerRe: File Pin
Hamid_RT27-Apr-07 18:45
Hamid_RT27-Apr-07 18:45 
AnswerRe: File Pin
vivekphlp27-Apr-07 18:52
vivekphlp27-Apr-07 18:52 
QuestionQuestion about Interlocked functions Pin
HOW WHAT27-Apr-07 17:29
HOW WHAT27-Apr-07 17:29 
AnswerRe: Question about Interlocked functions Pin
Arman S.27-Apr-07 22:49
Arman S.27-Apr-07 22:49 
AnswerRe: Question about Interlocked functions Pin
cmk28-Apr-07 13:23
cmk28-Apr-07 13:23 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT28-Apr-07 14:47
HOW WHAT28-Apr-07 14:47 
GeneralRe: Question about Interlocked functions Pin
cmk28-Apr-07 15:20
cmk28-Apr-07 15:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.