Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help! cannot use CTypedPtrList

Help! cannot use CTypedPtrList

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionjson
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jfk_lili
    wrote on last edited by
    #1

    hi, guys i need to use a CTypedPtrList templet structure in my program. here is my code: (CFreqStandard is a class which i derived from CObject and it's basically used to store some data) class CSDIgDoc : public CDocument { protected: // create from serialization only CSDIgDoc(); DECLARE_DYNCREATE(CSDIgDoc) protected: //CTypedPtrList FreqList; //CString StandardName; CString StandardName; CTypedPtrList m_FreqList;///////////////////// // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSDIgDoc) public: virtual BOOL OnNewDocument(); virtual void Serialize(CArchive& ar); //}}AFX_VIRTUAL // Implementation public: virtual ~CSDIgDoc(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CSDIgDoc) //}}AFX_MSG DECLARE_MESSAGE_MAP() }; but when i compile i always get an error in the line CTypedPtrList m_FreqList; it shows that "'CTypedPtrList' : missing storage-class or type specifiers" what is the problem in this case?:(( Thank you very much in advance

    K 1 Reply Last reply
    0
    • J jfk_lili

      hi, guys i need to use a CTypedPtrList templet structure in my program. here is my code: (CFreqStandard is a class which i derived from CObject and it's basically used to store some data) class CSDIgDoc : public CDocument { protected: // create from serialization only CSDIgDoc(); DECLARE_DYNCREATE(CSDIgDoc) protected: //CTypedPtrList FreqList; //CString StandardName; CString StandardName; CTypedPtrList m_FreqList;///////////////////// // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSDIgDoc) public: virtual BOOL OnNewDocument(); virtual void Serialize(CArchive& ar); //}}AFX_VIRTUAL // Implementation public: virtual ~CSDIgDoc(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CSDIgDoc) //}}AFX_MSG DECLARE_MESSAGE_MAP() }; but when i compile i always get an error in the line CTypedPtrList m_FreqList; it shows that "'CTypedPtrList' : missing storage-class or type specifiers" what is the problem in this case?:(( Thank you very much in advance

      K Offline
      K Offline
      KaRl
      wrote on last edited by
      #2

      You never defined the types to use for the template, like this for example: typedef CTypedPtrList m_FreqList; Have a look to this article[^] of MSDN for a sample. HTH, K.


      Mais donnez-moi aussi Le courage et la force et la foi Car vous êtes le seul à donner Ce que l'on ne peut obtenir que de soi.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups