convert vector* to float

A

ahso

Hi
I get:
cannot convert MProbeInfo_t*’ to ‘GLfloat’
How could I do such?
Many thanks
Michael
 
A

Asger Joergensen

Hi Michael
Hi
I get:
cannot convert MProbeInfo_t*’ to ‘GLfloat’
How could I do such?

You need to explain some more, as it doesn't make much sense to
convert a pointer to a floating point number.

Best regards
Asger-P
 
A

ahso

I want to use it with glVertex3f and I get values like altitude from
that vector:

glVertex3f(lx+1059, ly+749, ProbeResultat)->locZ);

it's declared as:
std::vector<Probe_t*> ProbeResultat;

Many thanks
 
V

Victor Bazarov

I want to use it with glVertex3f and I get values like altitude from
that vector:

glVertex3f(lx+1059, ly+749, ProbeResultat)->locZ);

it's declared as:
std::vector<Probe_t*> ProbeResultat;

Many thanks


So, the expression 'ProbeResultat' yields 'a pointer to Probe_t'.
The third argument of 'glVertex3f' (I'm guessing here, OpenGL is not
defined by C++ language), is the 'GLfloat' that you have a problem with,
right? Count the parentheses.

V
 
A

Asger Joergensen

Hi ahso
I want to use it with glVertex3f and I get values like altitude from
that vector:

glVertex3f(lx+1059, ly+749, ProbeResultat)->locZ);


You have an extra ) right before ->
try this instead:
glVertex3f( lx+1059, ly+749, ProbeResultat->locZ );

what type is Probe_t::locZ ?

Best regards
Asger-P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top