Go to Post And you said it would be an easy game hint... Time to break out the N-Spire and do some number crunching - CalTran [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 6 votes, 4.50 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-14-2009, 03:43 PM
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
void* pointer to object in C++

I have been at this for some time now, and this won't compile:
Code:
(function(int data))
void * MyPointer
if (data=0)
{
     Gyro gy(1);
     MyPointer = &gy;
}
if (data=1)
{
     Ultrasonic gy(1);
     MyPointer = &gy;
}
if (etc...
etc...
(function2(int data2))
if (data2=0)
     return MyPointer->GetValue(); //this produces error: 'void*' is not a pointer-to-object type (:eek:)
etc...
You can probably see what i am doing, (accessing different function based on sensor type), and Nothing has worked

Last edited by byteit101 : 01-14-2009 at 03:45 PM. Reason: code bock
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aiming that remote: Laser pointer allowed? efoote868 Rules/Strategy 9 03-02-2008 09:01 PM
Pointer to pwm bronxbomber92 Programming 5 02-07-2008 03:57 PM
Suspicious pointer conversion ebowla Programming 2 01-26-2008 12:13 PM
laser pointer 1574aviad Technical Discussion 9 02-20-2005 08:25 PM
problem with void Process_Data_From_Local_IO CmptrGk Programming 2 01-29-2005 05:14 PM


All times are GMT -5. The time now is 10:19 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi