473,757 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 4286
Banfa
9,065 Recognized Expert Moderator Expert
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
5124
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 relative NOT to the immediate script that is including it, but is relative to the top-level calling script. In practice, this means that you have to constantly worry and adjust paths in includes, based on the startup scripts that call these...
2
2940
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 driven. The regex would include if/then/else type logic, and would like my script to conditionally execute the logic. -- http://www.dbForumz.com/ This article was posted by author's request
8
3378
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 actual program. To me "scope" of the name of a function or object are the general rules for the areas of a program that can through a declaration, have "visibility."
5
3447
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; &lt;me@mydomain.com&gt;</Address> </Addresses>
8
3618
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 <br>mais pour avoir des resultats probant il faut pas faire les mariolles, comme le &quot;fondateur&quot; de bvs
2
4004
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 arrow and you see the entries in a dropdown. But how would I control this thing from javascript? Here is the HTML: <div class="selection" style="top:0; left:89; width:159; height:21;"
5
3686
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
2845
by: manchin2 | last post by:
Hi, Can anybody please provide the information about "&quot" and its use, if possible please provide an example. 1)<tm:bom-expression>{Conf.getEquityConfLookupFields().getEventFieldText(&quot;AdditionalDisruption&quot;,&quot;Change in Law&quot;)}</tm:bom-expression> 2)07:41:08 Default ( call ( . ( call ( . Conf getEquityConfLookupFields ) ) getEventFieldText ) ( , AdditionalDisruption Change inLaw ) ) value=Not applicable Can you please...
4
4214
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": onclick="toggleDisplay(&lt;%#Eval(&quot;description&quot;)%>);">Administrator Functions</td> When putting <%#Eval('description')%> in <td> tag, it understand & show the correct value, but when in onclick='toggleDisplay(<%#Eval("description")%>);'> it didn't...
2
37794
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? Thanks, jmash
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.