Solved

pointer to pointer

Posted on 2009-03-30
5
298 Views
Last Modified: 2012-05-06
Hello
I'm trying to use a NI library function that is decleard as below.
CWUIControlsLib_CWAxisGetFormatString (CAObjHandle objectHandle,
                                                       ERRORINFO *errorInfo,
                                                       char **returnValue);
The purpose is to read out a format string in "returnValue".
If I declear a pointer to pointer to char as char **Pointer, the compiler (CVI 8.5) complains
that the pointer is not initialized and I do not get the sting I'm looking for.
Anyone have a proposal ?
Regards Per
0
Comment
Question by:fluidtronic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 24018065
can you initialize the pointer?
if it is a pointer in which to return a value, you may want to point it to the place where you want the value returned.
0
 
LVL 6

Accepted Solution

by:
twocandles earned 50 total points
ID: 24018093
try to declare it as this:

char *returnValue[MAX_VALUE];

thus initializing it.
0
 

Author Comment

by:fluidtronic
ID: 24018110
Hi
I have tried this but with the same result.

char **Specifier,FormatString[80];
*Specifier=FormatString;       
CWUIControlsLib_CWAxisGetFormatString(Axis[0],NULL,Specifier);
0
 

Author Closing Comment

by:fluidtronic
ID: 31564293
That works. Thank you.
0
 
LVL 6

Expert Comment

by:twocandles
ID: 24018477
You're welcome. Thanks for the points!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question