-
October 24th, 2003, 01:17 AM
#1
Include MyView.h file to another class ?.
I have SDI app. created by APP Vizard. Could you explain me, why I can not add for example in CMyDlg.cpp file this line:
Code:
#include "MyView.h"
When I add this line to my CMyDlg.cpp file I receive errors as follows:
c:\and\cpp\myprojects\baxh\baxhview.h(28) : error C2143: syntax error : missing ';' before '*'
c:\and\cpp\myprojects\baxh\baxhview.h(28) : error C2501: 'CBaxhDoc' : missing storage-class or type specifiers
c:\and\cpp\myprojects\baxh\baxhview.h(28) : error C2501: 'GetDocument' : missing storage-class or type specifiers
Would you explain me, How to add MyView.h file to my another class. I need to have access to CMyView class.
Thanks in advance.
-
October 24th, 2003, 03:34 AM
#2
I need to have access to CMyView class.
Put
class CMyView;
in your .h file.
Snakekaa
Move like a snake, think like a snake, be a snake !!!
-
October 24th, 2003, 04:14 AM
#3
Re: Include MyView.h file to another class ?.
Originally posted by Andrzej
Would you explain me, How to add MyView.h file to my another class. I need to have access to CMyView class.
A view never goes without a doc (the interface of CMyView contains references to the corresponding document class). Therefore, you have to add the #include for your document just before #including your view.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|