Sign in to follow this  
Guest RobertRoe

C++ and SDK.FlightMap.c

Recommended Posts

I'm trying to expand the functionality sdk.flightmap.c and have renamed it as a C++ file - "sdk.flightmap.cpp". Now when I build I get the this error:error C2440: '=' : cannot convert from 'PVOID' to 'GPS_INFO *'snip/////////////////////////if (!gpsinfo){ MODULE_VAR var; initialize_var_by_name (&var, GPS_INFO_PANEL_VARIABLE_NAME); gpsinfo = var.var_ptr; //this line is the indicated culprit}/////////////////////////I'm very new to programming and need help to fix this.RegardsBlair

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Blair,The line has to read: gpsinfo = (GPS_INFO *)var.var_ptr;You can't discard the cast like that.Doug Dawson

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this