CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

2 dimensional array in PIC C (PIC18F4525)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ncvnmarket



Joined: 24 Oct 2009
Posts: 12

View user's profile Send private message

2 dimensional array in PIC C (PIC18F4525)
PostPosted: Sun Nov 22, 2009 9:02 pm     Reply with quote

Hi all,

I'm trying to use 2 dimensional array in PIC C compiler version 3.224. Even though the compiler doesn't give me any errors it seems it's not working.

Here is my code:
Code:

#define MAPWIDTH 10
#define MAPHEIGHT 16
#define SIZEBLOCK 8;//8x8 pixels
BOOLEAN GameStarted=FALSE;
BYTE Map[MAPHEIGHT][MAPWIDTH];//16 rows and 10 cols
...

//
   for (i=0;i<MAPHEIGHT;i++){
      for (j=0;j<MAPWIDTH;j++){
         Map[i][j]=TRUE;
      }
   }
   for (x=0;x<MAPHEIGHT;x++){
      for (y=0;y<MAPWIDTH;y++){
         if (Map[x][y]==TRUE){
            DrawBlock(y,x);
         }
      }
   }

Any helps?

Thanks
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Nov 23, 2009 1:07 am     Reply with quote

Two-dimensional arrays are generally working with PCH V3.xxx.
ncvnmarket



Joined: 24 Oct 2009
Posts: 12

View user's profile Send private message

PostPosted: Mon Nov 23, 2009 1:21 am     Reply with quote

Thanks
I fixed the problems.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group