|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Why it works with an underscore?
NVM that last one I got it figured out, it was just a simple ";" mistake, I added an extra ; at the end of the text to replace.
Alright heres the new problem... I have a bunch of if statements and they rely on a bunch of sensors, when these sensors read a certain set of digital values it would turn on certain solenoids, correct, but! if these digital values from the sensors changed (knowing this from printf), the solenoids stay the same. They do not change with the input so I'm guessing that I'm doing something wrong with the if statements. I have a lot of if's and in the very bottom on all the if statements, there would be an else if statement to eliminate any other undefined sensor readings. any suggestions to what I'm doing wrong? ************************************************** ************ Ah! yes, I found the mistakes there, I've been reading the powerpoint tutorials from IFI and it got me confused. I start putting ; and brackets all over the place....I'll remember it for next time. Last edited by Generalx5 : 06-01-2007 at 00:48. Reason: Added part under the * line. |
|
#2
|
||||
|
||||
|
Re: Why it works with an underscore?
You can also use #define in your header files
#ifndef header_h__ #define header_h_ stuff stuff stuff #endif Then if you put #include "header.h" more then once it will say hey! header_h__ is already defined stupid! you can't define it again!! and just exit........ ![]() |
|
#3
|
||||
|
||||
|
Re: Why it works with an underscore?
Quote:
You could use a switch loop. **Somebody please correct me if I am wrong, I don't remember is switch is only C++ or c too. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A poximity sensor that works with IFI gear | Validius | Control System | 10 | 16-03-2005 21:56 |
| A poximity sensor that works with IFI gear | Validius | Electrical | 10 | 16-03-2005 21:56 |
| Why is Dave hanging out with these guys? | JohnBoucher | NASA Discussion | 1 | 17-12-2004 10:38 |
| RoboEmu 1.06 (works with XP and 2k) | rbayer | Programming | 4 | 20-10-2002 21:47 |
| Are you a team with very little money, why/ | mnkysp6353 | General Forum | 6 | 09-10-2001 21:30 |