Go to Post I can't claim to be an expert in the stess analysis field - I just play one on TV, er CD, er - okay, so call me a poser! - petek [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 29-10-2008, 18:12
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Team 67 C++ Example Code

Quote:
Originally Posted by Tom Line View Post
I still don't get the reason behind wanting to use a pointer rather than just a variable.
Say you have a structure. It has a variable in it that you want to modify with a function. If you were to just pass the structure into the function, the compiler would pass a copy of the structure to the function, so any changes you did to the structure wouldn't change the original. This isn't the behavior you want. So instead, you pass a pointer to the structure to the function. That pointer is a number saying where the structure is in memory, so when the compiler makes a copy of the pointer to pass into the function, that still points to the correct place in memory. You can then modify the structure in your function, and it all works.

I can try to clarify later, if someone else doesn't beat me to it, if that was confusing.
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
[TBA]: Example Code Addition SamC The Blue Alliance 5 15-07-2011 16:11
Team 1114 Example C++ Code Pat Fairbank FRC Control System 2 12-11-2008 22:30
Example code TEAM1949 Programming 10 15-03-2006 16:00
Example gyro code released. Kevin Watson Programming 60 17-03-2005 18:32
Autonomous Code Example Matthew_H Robotics Education and Curriculum 24 21-11-2003 10:02


All times are GMT -5. The time now is 14:26.

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