CTestDoc* GetDocument() errors in view class

I am getting these errors in my view header:

error C2143: syntax error : missing ';' before '*'
error C2501: CTestDoc: missing storage-class or type specifiers
error C2501: 'GetDocument' : missing storage-class or type specifiers

for this statement:

CTestDoc* GetDocument();

Currently, I am using

class CTestDoc;

earlier in the file to satisfy the need.

Can I get some help on this?  Much appreciated!


0
srussell (115)
2/21/2004 1:02:40 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
1015 Views

Similar Articles

[PageSpeed] 29

At the top of your .cpp file put:

#include "TestDoc.h"

Or whatever the name of your file is.

KS


"Steve Russell" <srussell@innernet.net> wrote in message
news:%23%238BoZB%23DHA.548@TK2MSFTNGP11.phx.gbl...
> I am getting these errors in my view header:
>
> error C2143: syntax error : missing ';' before '*'
> error C2501: CTestDoc: missing storage-class or type specifiers
> error C2501: 'GetDocument' : missing storage-class or type specifiers
>
> for this statement:
>
> CTestDoc* GetDocument();
>
> Currently, I am using
>
> class CTestDoc;
>
> earlier in the file to satisfy the need.
>
> Can I get some help on this?  Much appreciated!
>
>


0
ks2057 (125)
2/21/2004 1:54:42 AM
There's something else I forgot to mention.  If you have:

class CTestDoc;

that's just a forward declare.  About the only thing that's good for is if
you have a circular dependency in classes.  You can put forward declares in
h files, but putting forward declares in cpp files don't really do much,
IMHO.

KS


"KS" <ks@blah.com> wrote in message
news:e8nzt2B%23DHA.3848@TK2MSFTNGP10.phx.gbl...
> At the top of your .cpp file put:
>
> #include "TestDoc.h"
>
> Or whatever the name of your file is.
>
> KS
>
>
> "Steve Russell" <srussell@innernet.net> wrote in message
> news:%23%238BoZB%23DHA.548@TK2MSFTNGP11.phx.gbl...
> > I am getting these errors in my view header:
> >
> > error C2143: syntax error : missing ';' before '*'
> > error C2501: CTestDoc: missing storage-class or type specifiers
> > error C2501: 'GetDocument' : missing storage-class or type specifiers
> >
> > for this statement:
> >
> > CTestDoc* GetDocument();
> >
> > Currently, I am using
> >
> > class CTestDoc;
> >
> > earlier in the file to satisfy the need.
> >
> > Can I get some help on this?  Much appreciated!
> >
> >
>
>


0
ks2057 (125)
2/21/2004 2:04:07 AM
Thank you.  I must have removed this #include somewhere along the line,
accidentally.  I wasn't sure that AppWizard had originally #included it, and
that this was the proper solution.
---------------
> At the top of your .cpp file put:
>
> #include "TestDoc.h"
>
> Or whatever the name of your file is.
>
> KS
>
>
> "Steve Russell" <srussell@innernet.net> wrote in message
> news:%23%238BoZB%23DHA.548@TK2MSFTNGP11.phx.gbl...
> > I am getting these errors in my view header:
> >
> > error C2143: syntax error : missing ';' before '*'
> > error C2501: CTestDoc: missing storage-class or type specifiers
> > error C2501: 'GetDocument' : missing storage-class or type specifiers
> >
> > for this statement:
> >
> > CTestDoc* GetDocument();
> >
> > Currently, I am using
> >
> > class CTestDoc;
> >
> > earlier in the file to satisfy the need.
> >
> > Can I get some help on this?  Much appreciated!
> >
> >
>
>


0
srussell (115)
2/21/2004 12:57:37 PM
Reply:

Similar Artilces:

Problem with View Source / Outlook 2000
I searched some more, found that the problem is caused when the Temporary Internet files cache is too big. Deleted the cache and the problem is solved. Changed the settings to a more reasonable 100 MB and it shouldn't happen again Steven =================================== I'm using Outlook 2000 and Win 2000, no problems now (had to reinstall Windows last week for unrelated reasons). I also use ZoneAlarm and Outlook has permission only to access the Trusted zone, not the Internet in general. Something has happened in the past couple of days. I got an email that looked blank ...

Is it possible to generate non-technical schema validation errors?
With the 1.0 Framework, I've worked out using the XmlValidatingReader. Since I'm using the validation errors as feedback to the end user, I'm hoping to get away from techy messages such as "The 'http://tempuri.org/XMLFile1.xsd:MaxDependents' element has an invalid value according to its data type. An error occurred at file:///c:/work/prodika/main/code/apps/schemavalidation/XMLFile1.xml(8, 25)." and go with a user friendly message of "Max Dependents must be between 0 and 10". I've scoured the newsgroups, MSDN and docs for creating custom valid...

Upgrading
I want to upgrade from Microsoft Money Financial Suite OEM Edition Version 11.0 to latest version but on trying to open the money file in Microsoft Money 2007 I get the following error message: File was created by an incompatible version Question 1: As the old version was pre-loaded into the Computer when I bought it in India, I don't know which country US/Canada/UK/Australia this software belongs to. So how can I confirm which country is it for? Question 2: And, how can I upgrade it to a version of Money from US or UK. -- Kapil ...

VBA Error Message "Compile Error...."
I used a macro from Ron's website to mail each worksheet to the email address in cell a1. I ran this macro and it worked perfectly for one workbook BUT... when I tried to use it for another workbook I got the follwing error message "Microsoft Visual Basic Compile Error Can't find project or library Ok Help". Help me please... do I have to check some more references in the VBA tools? Thanks, Steve Hi Steve Have you set the reference to Outlook in that other workbook also ? You must do that in every workbook or you can use Late binding. See my site for a example --...

Error 1606 Money Service Pack 2002
I have tried all of the suggested fixes that I've seen on these boards for the error 1606. I now have no money program, I can not reinstall the money program and the error still pops up in my Turbo Tax and it is driving me crazy! I can not delete the service pack from the add or remove programs applet. I would very much like to finish the taxes before the 15Th. Does someone know what is going on? I've deleted registry keys, done clean boots, tried to eliminate every vestige of the program that can be found yet, when I try to reinstall from the disk, I'm stymied by Error...

OWA Error for http links
links inside a message body always generate an asp redirect code that does not execute at all thus giving an http 500 error - page not found. Example on a link to http://www.nightlight.org within a mail body. http://orange/exchweb/bin/redir.asp? URL=http://www.nightlight.org/ Exchange Server 2003 running on Server 2000 SP4 PLease help. ...

Error 2455 Closing Access 2007 database with form open
I have a form with a subform that is requeried when you select a new key for the main form from a combo box. Everything works fine - usually. But sometimes if you have the form open when you close the database down you get the following error message (twice) in a pop up. You say OK (twice) and the database closes OK "2455 you entered an expression that has an invalid reference to the property form/report" If I close the form before the database I never get the error. If I do not touch the form before you close the database I don't get the error. If I update a field by t...

Error message #5
Excel 2000 - Try to save workbook as Excel 97 - 2000 & 5.0/95. Receive error message " An error occurred and this feature is no longer functioning properly. Would you like to repair the feature now?" If you say YES I get an "Internal Error 2709." Does anyone know how to determine what feature the error message is referring to and how to repair the issue randy ...

Error creating new task
Error .. "Could not complete operation. One or more parameter values are not vaild" ...

Public folder issue, "messaging interface has returned an unknown error"
I'm running a SBS2003 domain and just added a public folder and a customized form for entry into the public folder. All of our clients (all XP Pro, Outlook 2003 with all updates) can get to that folder and use the form without any difficulty except for one. On one computer I get the classic "The messaging interface has returned an unknown error. If the problem persists, restart Outlook." error message. I have tried a repair install, no change. I have tried making a new profile, no change. I have tried adding / removing his PST file (currently he's not even using a pst file...

View as web page in OWA
in OWA 2002, i remember there is a feature "View as web page" on the right side of the email. in OWA 2003, after open the received email, such feature no longer there. Anyway to enable this feature? ...

Outlook 2007 error event id: 35
Per hour i receive about 12'000 of these errors in the event viewer on my vista laptop. And usualy my outlook at some point just goes into the "not responding" mode. Then I have to kill the process from the task manager to be able to reopen outlook just to see it freeze again after a couple of seconds. I tried the whole stop indexing service and reinstall index service procedure to no avail. Does anyone else have a solution to this very anoying problem? Fred putzhilfe@gmail.com <putzhilfe@gmail.com> wrote: > Per hour i receive about 12'000 of these errors in the...

Error message when signing into Great Plains
I have a problem when setting up MS Great Plain. When I log into a company (E.G. company ABC), I receive an error message says "Decrypt Job Cost Creation Failed", I press OK, and the program just continues to run. Is there anyone know what is this message is about and how to resolve this problem?? Thank you very much This error is generated by the Wennsoft Products dictionary. Most times it relates to not installing the Wennsoft product from the SETUP.EXE. This is necessary as it installs and registers a couple DLL files, specifically WSREGKEYM.DLL and WSWRAPPER.DLL Refer to th...

Word 2007 Error message
Hello, I'm currently using Works Suite 2006. I am attempting to intall the Word 2007 upgrade to no avail as I receiving the following error message: SET-UP ERROR D:\wordR.ww\osetup.DLL digital signature does not validate or is not present I would appreciate any advice and/or suggestions so that I can install Word 2007. Ciao, Jerry Sorry Jerry but this is Microsoft Access forum. You need to post this question to a different group to find any useful help. "Jerry T" <Jerry T@discussions.microsoft.com> wrote in message news:B45E64C3-D080-405E-9159-CB3E7F73AFFC@micr...

Personal Folder Error when opening Outook 2002
When opening Outlook 2002, I receive the message that the Personal folder was not closed properly and needs to be checked. I allow the check to run, and all is fine. But this error message reappears after I close and reopen Outlook. Please Reply. thanks. ...

"could not fetch new headers " ERROR
i get the error " could not fetch new headers in the inbox of IMA server.The operation was cancelled ", while using my outlook 2000 o win98se mach. config: smtp/imap thro internet mail a/c option pl try to provide solutions to it. the error message pops up say every 5 min whenever outlook is on. thnks n regards gir ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com aggiridharan <aggiridharan.149yy0@outlookforum.com> wrote: > i get the error " coul...

Paid Sales Transaction Removal error message
Hola Familia When I try to do run a "Paid Sales Transaction Removal" against a specify customer (Microsoft Dynamics GP menu >> Tools >> Routines >> Sales >> Paid Transaction Removal) in Dynamics GP 10 with SQL 2005, I get the following error: [Microsoft] [SQL Native Client] [SQL Server] Violation of PRIMARY KEY constraint ‘PKRM30101’. Cannot insert duplicate key in object 'dbo.RM30101'. I searched for the error message in Customer Source Knowledge base and found Article ID : 861084, which I followed and it showed the duplicate document (invoice...

Error while backup SystemState via DPM 2010
Hi.. we backup the SystemState of our Server via DPM 2010. Since we're upgrade from DPM 2007 RTM to DPM 2010RC (now we use DPM 2010 RTM) on the Server DPM is hosted a eventlog error occured every day after the backup is finished: Source: FilterManager, Event ID: 3 "Filter Manager failed to attach to volume '\Device\HarddiskVolume....'. This volume will be unavailable for filtering until a reboot. The final status was 0xc03a001c." Server Version: Windows Server 2008 R2 x64 any ideas? Alex ...

absolutely cannot resolve timeout error
OL 2002 (10.6515.6626) SP3 Win XP HE Follow-up to: *microsoft.public.outlook* (this message is cross-posted to the newsgroups that appear in the headers. To reply, just click "Reply" in news client and it will go to the follow-up newsgroup *microsoft.public.outlook*, where u can follow the thread. Thanks.) Hi, I am constantly receiving error message: Task 'smtp server name - Sending and Receiving' reported error (0x8004210A): 'The operation timed out waiting for a response from the receiving (POP) server. If you continue to receive this message, contact your s...

Error trying to make an account default
I have a new computer and my outlook 2003 is not letting me assign a default account to send and receive. I get this error: "The Specicied Account could not be found. It might have been deleted." I have four accounnts setup and have tried removing the accounts and recreating them and still get the error. when the account has been made, it tests fine. None of the four can be made default. Thanks in Advance! ...

ESM 2003 info store Error on WinXP PC
ESM 2003 on Windows XP SP1a PC: Installed exchange system manager onto a windows xp sp 1a pc. I can run ESM fine, yet not administer public folders. When I access a public folder's properties, select the Permissions Tab and click "client permissions" button, I get an error-- The information store could not be opened. The logon to the Microsoft Exchange Server computer failed. MAPI 1.0 ID no: 80040111-0286-00000000 ID no: c105000 Exchange System Manager OK. Any ideas to resolve? Using ESM on server (even through RDC) works fine! Thanks! ~Terry ...

Can I have spell check ignore errors and alert me to real words?
Instead of stopping on misspellings and skipping real words, is there a way to stop on correct spellings to find actual words in a bunch of gibberish? Sort of an "UNspell check". For example, pass over "JJKSXO" but show me "SPELL". No, there is no way of doing that regards, Peo Sjoblom "JenLynFish" wrote: > Instead of stopping on misspellings and skipping real words, is there a way > to stop on correct spellings to find actual words in a bunch of gibberish? > Sort of an "UNspell check". For example, pass over "JJKSX...

Viewing shared 2003 outlook calendar in 2007 Outlook
Shared calendars with colleagues who have 2003. I can see the calendar but not the info in the calendar. Nothing is provate marked from their side and is able to be seen by other 2003 users. is there a quick fix? ...

Re: Money class and Fixed Decimal Class in C++
I am rewriting code that utilized Rogue Wave Money class and their fixed double class. Where can a find code to use for this. I assume that there are millions of applications written that have required rounding of numbers to represent currency. Thanks for your assistance That's a pretty vague question. Lacking any specifications of the classes involved, figuring out how to reimplement them is problematic. I first learned how to do this in 1965. It is old technology. Just figure out where you want the trucation and keep the value in those units, e.g., cents, millicents, etc. The...

Active Task View under Tasks
Hello. Does anyone know how to get the "completed" tasks off of my "Active Tasks" view. It should only show those tasks that are not yet complete but for some reason it shows the upcoming as well as the completed tasks (i.e. those that are lined out). Any help would be appreciated. -Lumas >-----Original Message----- >Hello. >Does anyone know how to get the "completed" tasks off of >my "Active Tasks" view. > >It should only show those tasks that are not yet complete >but for some reason it shows the upcoming as well as t...