error: ‘Filename’ was not declared in this scope : gcc-c++
spinning my wheels on this one - have checked out 6 or 7 similar issues through
google searches but nothing seems related. have simplified the issue for this post:
1. have a header file, CCDSFileManagerLNX.h, that is included by my main.cpp pgm:
#include <stdio.h>
class CDSFileManagerLNX{
public:
char* FileName;
char* FileMode;
FILE* pFile;
void FileOpen();
};
2. have a cpp file, CCDSFileManagerLNX.cpp, that has been added to the project source files as it should:
#include "/home/test/cds/ClassLibrary/CCDSFileManagerLNX.h"
void CCDSFileManagerLNX::FileOpen(){
FILE* pFile = fopen(Filename,FileMode);
}
3. when i attempt to runi get this:
../../cds/ClassLibrary/CCDSFileManagerLNX.cpp:4:21: error: ‘Filename’ was not
declared in this scope
FILE* pFile = fopen(Filename,FileMode);
^
WHAT THE .... er hey???
using netbeans ide on centos 7.4 and gcc - c++ compiler. thanks in advance for any
insight.
Bookmarks