Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/19/03 12:42
Read: times


 
#59007 - Structure Still not working !!
Responding to: ???'s previous message
Hi,
I tried it this way...

Put all my definitions in "DEFS.C" and declarations in "VARS.H"
in the definitions, I included

struct SENSORS
{
unsigned char ucSTATUS;
unsigned char ucALARM;
unsigned char ucACK;
unsigned char ucBLINK;
unsigned char ucGLOW;
short int siDELAY;
short int siACTUALDELAY;
};
struct SENSORS stSENSOR[8];

and included the line

extern struct SENSORS stSENSOR[8];

in the file VARS.H

I then #included VARS.H in the .C files that use some of the structure variables. But when I try to compile the .C files individually,
I get "error C230: unknown struct/union/enum tag" and also "error C204: undefined member" for all the structure members. Whats still going wrong?

PS: I'll refer K&R as soon as I go home. :). The problem is I've never had the need to write multi-file projects.

List of 20 messages in thread
TopicAuthorDate
Problem when I split Source Code            01/01/70 00:00      
   RE: Problem when I split Source Code            01/01/70 00:00      
      Downloading the File...            01/01/70 00:00      
         RE: Downloading the File...            01/01/70 00:00      
         aaaaaaaaaaarrrrrrrrrgggggggggghhhhhhhhhh            01/01/70 00:00      
            RE: aaaaaaaaaaarrrrrrrrrgggggggggghhhhhhhhhh            01/01/70 00:00      
               RE: aaaaaaaaaaarrrrrrrrrgggggggggghhhhhhhhhh            01/01/70 00:00      
   RE: Problem when I split Source Code            01/01/70 00:00      
      RE: Problem when I split Source Code            01/01/70 00:00      
   RE: Problem when I split Source Code            01/01/70 00:00      
   RE: Header Files            01/01/70 00:00      
      RE to SUSHIL and THE SOLUTION            01/01/70 00:00      
         RE: RE to SUSHIL and THE SOLUTION            01/01/70 00:00      
            RE: RE to SUSHIL and THE SOLUTION            01/01/70 00:00      
         RE: static            01/01/70 00:00      
            Thanks Donald and Andy            01/01/70 00:00      
               Important Lesson            01/01/70 00:00      
            Structure Still not working !!            01/01/70 00:00      
               RE: Structure Still not working !!            01/01/70 00:00      
                  Eureka.. :)            01/01/70 00:00      

Back to Subject List