View Single Post
  #12   Spotlight this post!  
Unread 24-01-2010, 22:15
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 159
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Re: Printing Float to Dashboard

Quote:
Originally Posted by TheDominis View Post
Strange, "WPILib.h" imports iostream...
Ah - but clever programmers know better than to take the lazy way out and include "WPILib.h". The most efficient way to use the WPILib library is to not #include the "kitchen sink", like WPILib.h does, but to #include only the headers that you actually need.

You will notice that nowhere else in the WPILib source code is either WPILib.h or iostream.h included. The iostream.h inclusion in WPILib.h is simply there for convenience, not because it is required.

I'm really not against the use of iostream.h (or <<iostream>>) where it makes sense. It's just that on our robots, the few places where it might actually be useful do not justify the overhead required.
Reply With Quote