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 CCS Technical Support

Problem with pointers PIC24FJ128GA010

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







Problem with pointers PIC24FJ128GA010
PostPosted: Mon Sep 15, 2008 8:16 am     Reply with quote

Hi,

I am using pic24fj128ga010 controller and CCS compiler v 4.078.

I am getting errors for the following code.
Code:

void main()
{
        int (*temp)[2];        /* pointer to an array */
}

I am getting the following errors for the declaration of 'temp'
1. Expecting a (
2. Expecting declaration.

What can be the problem?
Does ccs support pointers to arrays?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Sep 15, 2008 9:36 am     Reply with quote

I didn't check particularly, but following general C syntax a simple int pointer should do. There is no need to supply an array size with the definition, if you increase the pointer, it addresses the next array element.
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