PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I use a pointer as an argument?

Here is an example of a function...

// Function prototype
int foobar(unsigned int a, int *b);

// Function
int foobar(unsigned int a, int &b)
{
    // Acquire some data... then
    b = Data[a];
}

I get the following error:
73, syntax error; found '&' expecting ')'.

This is the normal method of passing in a pointer to an integer to a function and then setting the contents of the integer in the function. Why doesn't CVI let me do this? Is there another way?
0 Kudos
Message 1 of 3
(2,964 Views)

sorry cannot answer that one!

But I would suggest you to post your query in LabWINDOWS/CVI Discussion board and you can assured of a quicker reply/solution

0 Kudos
Message 2 of 3
(2,958 Views)
Probably.

I didn't even look at what board I was on. I submitted this one here because of a similar post was on this board.

Guess I'll repost.

I was wondering what all these PXI posts were doing here.... 😉
0 Kudos
Message 3 of 3
(2,950 Views)