Click here to Skip to main content
16,005,138 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegistering ActiveX ctrls on PC & Embedded platforms Pin
Like2Byte14-Feb-07 3:34
Like2Byte14-Feb-07 3:34 
AnswerRe: Registering ActiveX ctrls on PC & Embedded platforms Pin
Like2Byte14-Feb-07 5:37
Like2Byte14-Feb-07 5:37 
QuestionArray pointer lost Pin
Renato Carvalho14-Feb-07 2:59
Renato Carvalho14-Feb-07 2:59 
AnswerRe: Array pointer lost [modified] Pin
prasad_som14-Feb-07 3:13
prasad_som14-Feb-07 3:13 
GeneralRe: Array pointer lost Pin
David Crow14-Feb-07 3:24
David Crow14-Feb-07 3:24 
GeneralRe: Array pointer lost Pin
prasad_som14-Feb-07 4:30
prasad_som14-Feb-07 4:30 
GeneralRe: Array pointer lost Pin
David Crow14-Feb-07 4:40
David Crow14-Feb-07 4:40 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 4:49
Renato Carvalho14-Feb-07 4:49 
I tried the changes, but it did not compile. Then i changed the assignments at function "test" to "l[X]->i = 99;" and it compiled.
But, in fact, when it runs, the 3ª instruction fails with an access violation.
The code now looks like this:

typedef struct {
int i;} tpteste;

int test (tpteste ** l)
{
*l = new tpteste[4];
l[0]->i = 99;
l[1]->i = 98;
l[2]->i = 97;
l[3]->i = 96;

return 0;
}

int doNothing(void)
{
int j = 0;
tpteste * w;
j = test(&w);
return 0;
}

GeneralRe: Array pointer lost Pin
David Crow14-Feb-07 4:55
David Crow14-Feb-07 4:55 
GeneralRe: Array pointer lost Pin
prasad_som14-Feb-07 17:26
prasad_som14-Feb-07 17:26 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 4:31
Renato Carvalho14-Feb-07 4:31 
GeneralRe: Array pointer lost Pin
toxcct14-Feb-07 4:36
toxcct14-Feb-07 4:36 
AnswerRe: Array pointer lost Pin
prasad_som14-Feb-07 17:21
prasad_som14-Feb-07 17:21 
AnswerRe: Array pointer lost Pin
toxcct14-Feb-07 3:16
toxcct14-Feb-07 3:16 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 4:41
Renato Carvalho14-Feb-07 4:41 
GeneralRe: Array pointer lost Pin
toxcct14-Feb-07 4:44
toxcct14-Feb-07 4:44 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 4:55
Renato Carvalho14-Feb-07 4:55 
GeneralRe: Array pointer lost [modified] Pin
toxcct14-Feb-07 4:59
toxcct14-Feb-07 4:59 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 5:04
Renato Carvalho14-Feb-07 5:04 
GeneralRe: Array pointer lost Pin
toxcct14-Feb-07 5:08
toxcct14-Feb-07 5:08 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 5:17
Renato Carvalho14-Feb-07 5:17 
AnswerRe: Array pointer lost Pin
David Crow14-Feb-07 5:01
David Crow14-Feb-07 5:01 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 5:33
Renato Carvalho14-Feb-07 5:33 
GeneralRe: Array pointer lost Pin
Renato Carvalho14-Feb-07 5:45
Renato Carvalho14-Feb-07 5:45 
AnswerRe: Array pointer lost Pin
Michael ZY14-Feb-07 16:28
Michael ZY14-Feb-07 16:28 

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.