472,347 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,347 software developers and data experts.

"missing storage-class..." and "missing ';'... "

I'm following code out of a howto book and this is really bugging me. This header file was created by VStudio 6.0 when I did a "Right Click: Add Member Function" CLine is a class I wrote (per the book's instructions) and Line.h in included in Day10Doc.cpp

Here is the contents of Day10Doc.h
Expand|Select|Wrap|Line Numbers
  1. #if !defined(AFX_DAY10DOC_H__16736853_CB29_49E7_A8ED_C912CAE666EC__INCLUDED_)
  2. #define AFX_DAY10DOC_H__16736853_CB29_49E7_A8ED_C912CAE666EC__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7.  
  8.  
  9. class CDay10Doc : public CDocument
  10. {
  11. protected: // create from serialization only
  12.     CDay10Doc();
  13.     DECLARE_DYNCREATE(CDay10Doc)
  14.  
  15. // Attributes
  16. public:
  17.  
  18. // Operations
  19. public:
  20.  
  21. // Overrides
  22.     // ClassWizard generated virtual function overrides
  23.     //{{AFX_VIRTUAL(CDay10Doc)
  24.     public:
  25.     virtual BOOL OnNewDocument();
  26.     virtual void Serialize(CArchive& ar);
  27.     //}}AFX_VIRTUAL
  28.  
  29. // Implementation
  30. public:
  31.     CLine* GetLine(int nIndex); //LINE 36
  32.     int GetLineCount();
  33.     CLine* AddLine(CPoint ptFrom, CPoint ptTo);  //LINE 38
  34.     virtual ~CDay10Doc();
  35. #ifdef _DEBUG
  36.     virtual void AssertValid() const;
  37.     virtual void Dump(CDumpContext& dc) const;
  38. #endif
  39.  
  40. protected:
  41.  
  42. // Generated message map functions
  43. protected:
  44.     //{{AFX_MSG(CDay10Doc)
  45.         // NOTE - the ClassWizard will add and remove member functions here.
  46.         //    DO NOT EDIT what you see in these blocks of generated code !
  47.     //}}AFX_MSG
  48.     DECLARE_MESSAGE_MAP()
  49. private:
  50.     CObArray m_oaLines;
  51. };
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54.  
  55. //{{AFX_INSERT_LOCATION}}
  56. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  57.  
  58. #endif // !defined(AFX_DAY10DOC_H__16736853_CB29_49E7_A8ED_C912CAE666EC__INCLUDED_)
day10doc.h(36) : error C2143: syntax error : missing ';' before '*'
day10doc.h(36) : error C2501: 'CLine' : missing storage-class or type specifiers
day10doc.h(36) : error C2501: 'GetLine' : missing storage-class or type specifiers
day10doc.h(38) : error C2143: syntax error : missing ';' before '*'
day10doc.h(38) : error C2501: 'CLine' : missing storage-class or type specifiers
day10doc.h(38) : error C2501: 'AddLine' : missing storage-class or type specifiers

I can't find any obvious syntax error, and I have no idea what the storage class line means...
Jan 17 '07 #1
1 4111
Banfa
9,065 Expert Mod 8TB
Is Line.h included into Day10Doc.cpp before or after Day10Doc.h.

It needs to be included before Day10Doc.h because Day10Doc.h makes use of it's contents.
Jan 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or...
2
by: steve | last post by:
Hi, I need to do conditional script "include", but like to pull the code from db instead of a file. How do I do that? Reason: I like to...
8
by: TTroy | last post by:
I have a few questions about "scope" and "visibility," which seem like two different things. To me "visibility" of the name of a function or...
5
by: martin | last post by:
Hi, I would be extremly grateful for some help on producing an xml fragemt. The fragment that I wish to produce should look like this ...
8
by: Ulysse | last post by:
Hello, I need to clean the string like this : string = """ bonne mentalit&eacute; mec!:) \n <br>bon pour info moi je...
2
by: Angus | last post by:
I am trying to change the selection in Javascript - but this HTML element is not a standard option control. On the web page it looks like a...
5
by: Maria Sudderman | last post by:
I have a prblem with the "onClick" command. onClick="insert('<a href="URI">', '</a>')"> but this is not correct! why? Maria
1
by: manchin2 | last post by:
Hi, Can anybody please provide the information about "&quot" and its use, if possible please provide an example. ...
4
by: thaytu888888 | last post by:
Here is my codes in aspx page: <td colspan="2" class="main_menu" runat="server"...
2
by: jmash | last post by:
Suppose I have the following string whch is part of an xml string: String s= "Script Id=&quot;Test&quot; " And I need to get s= "Script Id="Test" " ...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.