How to include "testviw. H" in mainfrm. cpp in SDI project"

Source: Internet
Author: User

Http://www.codeproject.com/Forums/1647/C-Cplusplus-MFC.aspx? FID = 1647 & DF = 90 & MPP = 25 & Noise = 3 & sort = Position & view = Quick & Fr = 26 # xx0xx

I create a SDI project with VC 6.0.

I have to put

 

# Include "Testview. H"

In the file mainfrm. cpp, since I need to link testview to a splitted window pane using


Wndsplitter_horizontal.createview (0,0, Runtime_class (ctestview), csize (50,50), Pcontext );

However, the compiler complaint with the following lines.

D: \ vc_project \ test \ testview. H ( 27 ): Error c2143: syntax error: Missing ';' Before '*' D: \ vc_project \ test \ testview. H (27 ): Error c2501: 'Ctestdoc' : Missing storage- Class Or type specifiers
D: \ vc_project \ test \ testview. H ( 27 ): Error c2501: 'Getdocument' : Missing storage- Class Or type specifiers

The error can be replayed easily by creating a SDI project and typing in the mainfrm. cpp File

 
# Include "Testview. H"

I have had a look online, but found no solutions.

Modified on Friday, January 7, 2011 9: 18 am

 

 

You shoshould include testdoc. h as well since ctestview depends on it. in my opinion, that shoshould have been taken care of in the testview. h file, to make it self supporting. but sometimes Compilation speed is preferred over example-of-use.

Home

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.