CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Location
    Prague, Czech Republic
    Posts
    263

    CString in Class Definition (Header File)

    Hello,

    I have written a class. Now I would like to include a public Method that takes a vector<CString> pointer as a paramter. The cpp file of the class includes MFC so there is no problem. But I get an error, because the compile complains, that the types vector and CString are not known (in the header). Do I have to include MFC into my Header file or how do I solve such problem?

    Thanks a lot.



    Best wishes,

    Matthias Steinbart

  2. #2
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    Re: CString in Class Definition (Header File)

    You have either include the MFC (afx.h) and vector headers in your header time, or always include these files BEFORE including your header in cpp file.

    Jack.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured