Im having trouble storing my string from user input into fileName. I need to save fileName into GetfileName().
Here is a snippet of my code:
class Frame {
char* fileName;
Frame* pNext;
public:
Frame();
~Frame();
char*& GetfileName() { return fileName; }
Frame*& GetpNext() { return pNext; };
};
void Animation::InsertFrame() {
Frame* frame = new Frame; //used to hold the frames
char* firstName = new char[40];
cout << "Please enter the Frame filename :";
cin.getline(firstName, 40); //enter a filename
strcpy(&frame->GetfileName, firstName); //error, need to copy the inputed name into the function getFileName that returns a char* filename
}