Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Andraw11123-Jul-12 3:44
Andraw11123-Jul-12 3:44 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Richard MacCutchan23-Jul-12 4:30
mveRichard MacCutchan23-Jul-12 4:30 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Andraw11123-Jul-12 5:36
Andraw11123-Jul-12 5:36 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Richard MacCutchan23-Jul-12 5:45
mveRichard MacCutchan23-Jul-12 5:45 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Andraw11123-Jul-12 6:24
Andraw11123-Jul-12 6:24 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Richard MacCutchan23-Jul-12 7:14
mveRichard MacCutchan23-Jul-12 7:14 
GeneralRe: Windows has triggered a breakpoint in exe....... Pin
Stephen Hewitt20-Jul-12 6:55
Stephen Hewitt20-Jul-12 6:55 
Generalerror C2491: 'XXX'::entries' : definition of dllimport function not allowed Pin
Andraw11119-Jul-12 4:51
Andraw11119-Jul-12 4:51 
Hi, dear all,

I have a DLL file created in C++ 6.0, now move to VS2008 and get compile error.

in header file:

#define XXXPORT __declspec(dllimport)

template <class TP> class XXXPORT TPtrList
{
public:
int entries(bool deleted = false) const;

TP *operator[](int n);
const TP *operator[](int n) const;
..............
..............

}

in .cpp file

template <class TP>
inline int TPtrList<TP>::entries(bool deleted) const
{
.........
}

template <class TP>
inline TP *ABSTPtrList<tp>::operator[](int n)
{
.........}

In C++, they are fine, but in VS2008, When I compile it, I got

error C2491: 'TPtrList<TP>'::entries' : definition of dllimport function not allowed

error C2491: 'TPtrList<TP>::operator []' : definition of dllimport function not allowed

What cause this problem? Thanks!
AnswerRe: error C2491: 'XXX'::entries' : definition of dllimport function not allowed Pin
Albert Holguin19-Jul-12 5:09
professionalAlbert Holguin19-Jul-12 5:09 
GeneralRe: error C2491: 'XXX'::entries' : definition of dllimport function not allowed Pin
Andraw11119-Jul-12 5:35
Andraw11119-Jul-12 5:35 
Generalerror C2679: binary '!=' : no operator found which takes a right-hand operand of type 'int' In VS2008 Pin
Andraw11119-Jul-12 4:20
Andraw11119-Jul-12 4:20 
GeneralRe: error C2679: binary '!=' : no operator found which takes a right-hand operand of type 'int' In VS2008 Pin
Chris Losinger19-Jul-12 4:27
professionalChris Losinger19-Jul-12 4:27 
GeneralRe: error C2679: binary '!=' : no operator found which takes a right-hand operand of type 'int' In VS2008 Pin
Stephen Hewitt19-Jul-12 4:27
Stephen Hewitt19-Jul-12 4:27 
GeneralRe: error C2679: binary '!=' : no operator found which takes a right-hand operand of type 'int' In VS2008 Pin
Andraw11119-Jul-12 4:35
Andraw11119-Jul-12 4:35 
Questionc++ code Pin
phineas kimathi19-Jul-12 2:46
phineas kimathi19-Jul-12 2:46 
AnswerRe: c++ code Pin
Richard MacCutchan19-Jul-12 3:21
mveRichard MacCutchan19-Jul-12 3:21 
AnswerRe: c++ code Pin
Rajesh R Subramanian19-Jul-12 3:34
professionalRajesh R Subramanian19-Jul-12 3:34 
AnswerRe: c++ code Pin
Software_Developer19-Jul-12 6:52
Software_Developer19-Jul-12 6:52 
GeneralRe: c++ code Pin
Richard MacCutchan19-Jul-12 22:20
mveRichard MacCutchan19-Jul-12 22:20 
SuggestionRe: c++ code Pin
David Crow20-Jul-12 2:29
David Crow20-Jul-12 2:29 
GeneralRe: c++ code Pin
Software_Developer20-Jul-12 3:30
Software_Developer20-Jul-12 3:30 
QuestionError happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11118-Jul-12 9:16
Andraw11118-Jul-12 9:16 
AnswerRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Albert Holguin18-Jul-12 9:47
professionalAlbert Holguin18-Jul-12 9:47 
GeneralRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Andraw11118-Jul-12 10:01
Andraw11118-Jul-12 10:01 
AnswerRe: Error happen when open file while migrate VC++ 6 to VS2008 Pin
Albert Holguin18-Jul-12 11:35
professionalAlbert Holguin18-Jul-12 11:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.