...are you kidding me?
I know that I am just in a bad mood tonight and aggrivated by all the users asking us to do thier homework but really.
you need to read some basic tutorials on C or get a book. You continue to post code that is just wrong in basic construction.
The errors tell it all. Unresolved means that the compiler/linker does not know what the symbol is --- usually means that you did not define this symbol.
So the first one: initBuffer()... the first occurance of it is a declaration INSIDE MAIN!!! WTF! have you EVER written a C program? WHY is this here? for that matter why are ANY function prototypes in the main() function!
So here is the basic layout of C program:
CODE
//First thing in the file would be special compiler directives to control the compiler, these are rare.
//Next thing is includes: They are here so that they can be used from here down
#include <stdio.h>
#include <stdlib.h>
//Preprocessor macros
#define BUFFSIZE 10
//typedefs/structs/enums/unions/etc any data structures that may be used
//Function declarations
void initBuffer(void);
void pushBuffer(unsigned char);
unsigned char popBuffer(void);
//global variables
//Now we can finally get around to main()
int main() {
//declare variables
unsigned char ucBuffer[BUFFSIZE];
unsigned char ucBufferPointer;
unsigned char ucData;
int iLoop;
//code
initBuffer();
printf("generating some characters\n");
for(iLoop=0;iLoop<26;iLoop++) {
ucData = (unsigned char)(0x41 + iLoop);
printf("%c",ucData);
pushBuffer(ucData);
}
printf("Getting data from the buffer\n");
for(iLoop=0;iLoop<26;iLoop++) {
ucData = popBuffer();
printf("%c",ucData);
}
return 0;
}
//Here we define the functions that we decalred
void initBuffer(void) {
}
void pushBuffer(unsigned char) {
}
unsigned char popBuffer(void) {
}
I will no longer respond to posts from you if the program does not follow this basic format... and as I am the only one who has been responding to your posts, your only chance is to LEARN how to avoid the mistakes you are making over and over.