|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: p1_sw_aux data type
"pwm01 goes to a motor that is meant to pivot two casters. I know that the victor its wired to works as well as the controller and cables and such. I know that in C++ the if statements should work but I haven't used C in a while and I forgot the differences in the two standards. Again, any help is greatly appreciated."
C++ is a superset of C thus everything that works in C will work in C++. Your code looks OK. You know p2_sw_aux1 is on the second joystick, correct? Print the value of p2_sw_aux1 to make sure it is changing. HTH |
|
#2
|
||||
|
||||
|
Re: p1_sw_aux data type
Quote:
This isn't entirely true. C++ is a modified version of C that incorporates true object oriented programming into it. There are also a few fundamental syntax changes (cout<<""; instead of printf(""), as one example) that may play havoc with direct conversions of code. If you are coming from C++ to C, the differences are easy and trivial enough to learn C. |
|
#3
|
||||
|
||||
|
Re: p1_sw_aux data type
"This isn't entirely true."
This is a common mis-perception. Its entirely true, C++ is a superset of C that expands the syntax to include object-oriented concepts, streaming I/O and other constructs. Though it is not the recommended practice, I can use printf in C++. It makes no difference in this thread I reckon but C preceded C++, not the other way around. HTH |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Robot Type | Betty_Krocker | General Forum | 0 | 08-01-2008 22:17 |
| printing FLOAT data type on the terminal window | razer | Programming | 14 | 05-02-2007 08:55 |
| Field Location of Type-0 and Type-1 IR Signals | Travis Hoffman | General Forum | 3 | 27-02-2004 07:58 |