?
Solved

URGENT: Simple Header problem

Posted on 2003-10-25
1
Medium Priority
?
238 Views
Last Modified: 2010-04-01
I can't figure out why I this doesn't work:

in my header file:

enum mapi_TFolderType {mftInbox,mftOutbox,mftSent,mftDeleted,mftCalendar,mftContacts,mftJournal,mftNotes,mftTasks,mftSpecial,mftMail,mftStuff};
mapi_TFolderType GetFolderType(mapi_TEntryid &eid, IMAPIFolder *f);
      

in my .cpp file of the class
mapi_TFolderType MapiClass::GetFolderType(mapi_TEntryid &eid, IMAPIFolder *f)

errors:

c:\temp\SynchroTest\MapiClass.cpp(478): error C2143: syntax error : missing ';' before 'MapiClass::GetFolderType'
c:\temp\SynchroTest\MapiClass.cpp(478): error C2501: 'mapi_TFolderType' : missing storage-class or type specifiers
c:\temp\SynchroTest\MapiClass.cpp(479): error C2556: 'int MapiClass::GetFolderType(mapi_TEntryid &,IMAPIFolder *)' : overloaded function differs only by return type from 'MapiClass::mapi_TFolderType MapiClass::GetFolderType(mapi_TEntryid &,IMAPIFolder *)'
c:\temp\SynchroTest\MapiClass.cpp(479): error C2371: 'MapiClass::GetFolderType' : redefinition; different basic types

I'm guessing its something simple that I just can't see.  
0
Comment
Question by:jjacksn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
mtmike earned 1000 total points
ID: 9620971
In case the enum type is defined inside the class

class MapiClass {
public:
      enum mapi_TFolderType {
            mftInbox, mftOutbox
      };

      mapi_TFolderType MapiClass::GetFolderType();
};

then you have to specify its full type name when using it outside the class

MapiClass::mapi_TFolderType MapiClass::GetFolderType()
{
}
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question