Go to Post I know my posts are sometimes exhausting but there are PICTURES in this one, if that helps at all. - Jaine Perotti [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-01-2009, 14:31
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: detecting your own alliance(C++)

The double colon ("::") is a namespace operator. For example, one of the namespaces in C++ is the standard namespace, "std". So you could say,

"std::cout" etc

since cout is in the std namespace.

You could also say at the beginning of your program:

"using namespace std;"

This would allow you to implicitly refer to the std namespace.

The dot operator is different. It allows you direct (non-pointer) access to data members of a class. For example, if you had some class Apple, you might have a call such as...

"myApple.color" which could be red, yellow, greeen, etc. I don't fully understand jtdowney's code, since I am not at all familiar with the new interface, but this is the meaning of the dot operator versus double colon.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-01-2009, 14:38
Red Mage's Avatar
Red Mage Red Mage is offline
Owner of Holistic Omniscience
FRC #1546 (Chaos Inc)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: New York
Posts: 35
Red Mage is on a distinguished road
Send a message via AIM to Red Mage
Re: detecting your own alliance(C++)

Okay, thanks. Also, how do you distinguish between the light of each alliance. I always thought they were identical. If that's true, make sure your camera is pointed forward at the beginning of the match and lock onto the first thing you see. It'll undoubtedly be an enemy robot. Then, never let it out of your sight. Autonomous is only 15s, so this should be fine.
__________________
Don't Blink. Blink and you're dead. Don't turn your back. Don't look away. And don't Blink. Good Luck.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-01-2009, 14:53
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: detecting your own alliance(C++)

Quote:
Originally Posted by Red Mage View Post
Okay, thanks. Also, how do you distinguish between the light of each alliance. I always thought they were identical. If that's true, make sure your camera is pointed forward at the beginning of the match and lock onto the first thing you see. It'll undoubtedly be an enemy robot. Then, never let it out of your sight. Autonomous is only 15s, so this should be fine.
You would be able to tell what alliancea robot you see is on based on the orientation of the color targets at the top of the trailer. Pink over green would be red alliance, green over pink would be blue alliance.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 04-01-2009, 14:59
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: detecting your own alliance(C++)

Couldn't you dect the other robot by the fact you you recieve there instructions but just ignore them since they arn't coded for IP
(that should work right, or it will let you know who is on the field with you)
__________________
Is now an engineer thanks to FIRST.
Reply With Quote
Reply


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
Make your own CNC whytheheckme Technical Discussion 8 25-07-2007 02:13
Your Own Team Siggies Cujo General Forum 8 26-02-2005 16:01
any of your regional "buddies" with your in your alliance? Alex Cormier Championship Event 12 08-04-2004 04:20
How do you tell whether your sensor is detecting a crate or the diamond plate? Greg Ross Technical Discussion 4 13-01-2003 19:02
Making your own gearbox? ChaosMonkey Motors 15 25-05-2002 11:07


All times are GMT -5. The time now is 13:43.

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