|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
HELP!!! Counters, global variables, and the like
Well, here's a question with an answer that's probably very obvious. How do I create a counter used by both the default routine and process IO functions? I tried declaring a global variable, but MPLAB had a major case of PMS when I did. Perhaps I'm doing it wrong? Below the includes, I simply declared
int counter=0; Is there a better way of doing this? Also, how do I pass values between functions? Once again, the compiler gets testy This is urgent, as we ship in 2 days |
|
#2
|
||||
|
||||
|
Re: HELP!!! Counters, global variables, and the like
well... if they are in separate files, you need to declare it in each file... do
Code:
int count=0; Code:
extern int count; |
|
#3
|
|||||
|
|||||
|
Re: HELP!!! Counters, global variables, and the like
dont forget you get to work on programing after you ship
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help On Coding 2K1 Controller | GregTheGreat | Programming | 9 | 05-12-2003 18:35 |