Problems with CFile and MFC objects
When I try to declair an object of CFile it gives me the class not declaired type error. Here are my system includes:
#include
#include
#include
#include
#include
#include
What else do I need?
Is this an MFC project? You almost definitely need stdafx.h and the first include in every .CPP file.
- Create a new project
- Make it an MFC project instead of a win32 project, since that''s what you''re doing.
This will set up your project settings correctly. If you want to do it manually, you might try playing with that first tab under Project->Settings->General->Microsoft Foundation Classes.
- Make it an MFC project instead of a win32 project, since that''s what you''re doing.
This will set up your project settings correctly. If you want to do it manually, you might try playing with that first tab under Project->Settings->General->Microsoft Foundation Classes.
Well, that''s the think. I''m about 5000 lines into this thing and just did a MAJOR overhaul on my orginization, and I want to use MFC for file I/O.
try going to the project, settings, and in the general tab, there should be a list box labeled "microsoft foundation classes", and change that to use mfc in a shared dll. im not sure if thats what you need or not.
I wasn''t saying you should re-write all of your code. Just start a new project, and copy your code into the template files MFC builds for you. Or do it manually by turning on pre-compiled headers (automatic: stdafx.h) for all of your files and include stdafx.h as the first line in each .cpp file.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement