473,385 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 4256
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 something I don’t get)? The path in include is...
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 implement some complex regex logic, and make it table...
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 object is the actual code that can use it in an...
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 <Addresses> <Address>&qout;Somebody's Name&quot;...
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 suis un serial posteur arceleur dictateur ^^* \n ...
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 dropdown list - and you click on the right hand down...
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" onclick='toggleDisplay(<%#Eval("description")%>);'><%#Eval("description")%></td> Here is in "View source": ...
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" " Can anyone tell me how this can acheived? ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.