Fred.Amoson
New Member
I am working on a new project with the C18 compiler. For the most part things are going well, but I have ran into a few glitches that I cannot figure out.
One small thing that I can't figure out is that everytime I compile I get:
"Warning [2058] call of function without prototype"
Even though the function being called does have a prototype. For instance, on the line where the function initializeLCD() is called, it gives me that warning, however in my header file I have the line:
void initializeLCD();
and the header file is included in the project. Anyone know what the deal with this is?
Also, I can't seem to get pointers working in C18. I am trying to have a globally addressable array of text that I can read to or write from any function. Any attempt at this has failed. Here is a snippet of where I define my variables:
Then in a later function I set:
pData = "Testing";
But when I try to pull up pData[0] I get a 0 instead of a T. Also, dataArray is still equal to text array. I've tried a combination of & and * but I just can't seem to get it. Any help would be greatly appreciated!
One small thing that I can't figure out is that everytime I compile I get:
"Warning [2058] call of function without prototype"
Even though the function being called does have a prototype. For instance, on the line where the function initializeLCD() is called, it gives me that warning, however in my header file I have the line:
void initializeLCD();
and the header file is included in the project. Anyone know what the deal with this is?
Also, I can't seem to get pointers working in C18. I am trying to have a globally addressable array of text that I can read to or write from any function. Any attempt at this has failed. Here is a snippet of where I define my variables:
Code:
char dataArray[] = "Text Array";
char *pData;
void main (void)
{
OSCCON = 0b01110000; //8MHz Clock
pData = dataArray;
Then in a later function I set:
pData = "Testing";
But when I try to pull up pData[0] I get a 0 instead of a T. Also, dataArray is still equal to text array. I've tried a combination of & and * but I just can't seem to get it. Any help would be greatly appreciated!