Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to get access to accept null values through code? Pin
nss16-Aug-02 18:13
nss16-Aug-02 18:13 
GeneralA strange compiler error C2440 Pin
IFREETA16-Aug-02 13:56
IFREETA16-Aug-02 13:56 
GeneralRe: A strange compiler error C2440 Pin
Daniel Lohmann16-Aug-02 21:34
Daniel Lohmann16-Aug-02 21:34 
GeneralRe: A strange compiler error C2440 Pin
Stuart Dootson17-Aug-02 0:30
professionalStuart Dootson17-Aug-02 0:30 
GeneralRe: A strange compiler error C2440 Pin
Daniel Lohmann17-Aug-02 11:27
Daniel Lohmann17-Aug-02 11:27 
GeneralRe: A strange compiler error C2440 Pin
IFREETA17-Aug-02 1:57
IFREETA17-Aug-02 1:57 
GeneralRe: A strange compiler error C2440 Pin
dlhson17-Aug-02 9:12
dlhson17-Aug-02 9:12 
GeneralNot so simple Pin
IFREETA17-Aug-02 3:28
IFREETA17-Aug-02 3:28 
...
// in the header <vector>
void _Insert_n(iterator _Where, size_type _Count, const _Ty& _Val)
        {   // insert _Count * _Val at _Where
        _Ty _Tmp = _Val;    // in case _Val is in sequence
                            // C2440 was actually raised here
        size_type _Capacity = capacity();
...

It seems that the compiler could not find the operator=, but a copy constructor and the operator= have been present in the header <memory>:
template<class _Ty>
    class auto_ptr
        {   // wrap an object pointer to ensure destruction
public:
    typedef _Ty element_type;

    explicit auto_ptr(_Ty *_Ptr = 0) _THROW0()
        : _Myptr(_Ptr)
        {   // construct from object pointer
        }

    auto_ptr(auto_ptr<_Ty>& _Right) _THROW0()
        : _Myptr(_Right.release())
        {   // construct by assuming pointer from _Right auto_ptr
        }

    auto_ptr(auto_ptr_ref<_Ty> _Right) _THROW0()
        : _Myptr(_Right._Ref.release())
        {   // construct by assuming pointer from _Right auto_ptr_ref
        }
...
    auto_ptr<_Ty>& operator=(auto_ptr<_Ty>& _Right) _THROW0()
        {   // assign compatible _Right (assume pointer)
        reset(_Right.release());
        return (*this);
        }
...

The compiler just ignored them.

-------------
You don't know what you've got till it's gone.
GeneralRe: Not so simple Pin
Daniel Lohmann17-Aug-02 11:30
Daniel Lohmann17-Aug-02 11:30 
GeneralRe: Not so simple Pin
Stuart Dootson17-Aug-02 11:35
professionalStuart Dootson17-Aug-02 11:35 
GeneralRe: A strange compiler error C2440 Pin
Stuart Dootson17-Aug-02 21:59
professionalStuart Dootson17-Aug-02 21:59 
GeneralRe: A strange compiler error C2440 Pin
Mike Nordell17-Aug-02 23:25
Mike Nordell17-Aug-02 23:25 
GeneralNeed a help with CDialog and WM_QWERYENDSESSION Pin
Pavel Sokolov16-Aug-02 13:19
Pavel Sokolov16-Aug-02 13:19 
GeneralRe: Need a help with CDialog and WM_QWERYENDSESSION Pin
Daniel Ferguson16-Aug-02 21:05
Daniel Ferguson16-Aug-02 21:05 
GeneralRe: Need a help with CDialog and WM_QWERYENDSESSION Pin
Pavel Sokolov17-Aug-02 0:16
Pavel Sokolov17-Aug-02 0:16 
GeneralReal document in View Pin
RocardoS16-Aug-02 13:00
sussRocardoS16-Aug-02 13:00 
GeneralMFC newbie needs help with CString Pin
Raskolnikov16-Aug-02 12:42
Raskolnikov16-Aug-02 12:42 
GeneralRe: MFC newbie needs help with CString Pin
valikac16-Aug-02 13:14
valikac16-Aug-02 13:14 
GeneralRe: MFC newbie needs help with CString Pin
Christian Graus16-Aug-02 13:19
protectorChristian Graus16-Aug-02 13:19 
GeneralCString Trim Pin
Shotgun16-Aug-02 12:26
Shotgun16-Aug-02 12:26 
GeneralRe: CString Trim Pin
Michael Dunn16-Aug-02 12:32
sitebuilderMichael Dunn16-Aug-02 12:32 
GeneralRe: CString Trim Pin
Shotgun16-Aug-02 12:38
Shotgun16-Aug-02 12:38 
QuestionCan we put an Icon (Shortcut) for an application with Visual C++ 6.0 MFC in Run Time? Pin
Anonymous16-Aug-02 11:15
Anonymous16-Aug-02 11:15 
AnswerRe: Can we put an Icon (Shortcut) for an application with Visual C++ 6.0 MFC in Run Time? Pin
Anonymous16-Aug-02 12:00
Anonymous16-Aug-02 12:00 
GeneralRe: I tried & failed Pin
ATC16-Aug-02 13:41
ATC16-Aug-02 13:41 

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.