//LAST_FILLER_NUMBER, FIRST_FILLER_NUMBER, FILLER_IMAGE_EXT are all globals
// This function is being passed a string to a directory
//load the filler images from the given folder into a linked list of fillerImage classes.
bool loadFillerImagesFromFolder(string folder)
{
char buffer[900];
fillerNode *location = new fillerNode;
fillerNode *pre = head ;
fillerNode * next = NULL;
for ( int i = FIRST_FILLER_NUMBER; i < LAST_FILLER_NUMBER; i++ ) // loop through all 900 images
{
filler.setTimesUsed(i);
location->data = sprintf(buffer, "%i %s \n", filler.getTimesUsed() , FILLER_IMAGE_EXT );
// I get and error cannot convert from "int" to fillerImage*" on line 14
}
.....
.....
returntrue;
}
// here is the fillerNode.h file
struct fillerNode
{
fillerImage *data;
fillerNode *pre;
fillerNode * next;
};
I will use *pre and *next to fill the node with the images after I get the line 14 error fixed.