Click here to Skip to main content
15,923,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Views Pin
Ben Burnett22-Oct-02 14:13
Ben Burnett22-Oct-02 14:13 
GeneralHide the Windows Clock Pin
alpha+22-Oct-02 12:52
alpha+22-Oct-02 12:52 
GeneralDialogBox Pin
G. White22-Oct-02 12:37
G. White22-Oct-02 12:37 
GeneralRe: DialogBox Pin
Paul M Watt22-Oct-02 12:46
mentorPaul M Watt22-Oct-02 12:46 
GeneralRe: DialogBox Pin
Christian Graus22-Oct-02 13:19
protectorChristian Graus22-Oct-02 13:19 
QuestionTerminating window-less process? Pin
Abin22-Oct-02 12:29
Abin22-Oct-02 12:29 
AnswerRe: Terminating window-less process? Pin
Hans Ruck22-Oct-02 23:41
Hans Ruck22-Oct-02 23:41 
Generaloverloaded operator new and STL vector Pin
Nemanja Trifunovic22-Oct-02 12:30
Nemanja Trifunovic22-Oct-02 12:30 
When I try to compile this piece of code

#include <cstddef>
#include <vector>

class klasa
{
char data[100];
public:

void* operator new (size_t)
{
return ::new klasa;
}

void operator delete (void* pt)
{
if (pt == 0) return;

::delete(pt);
}
};

void main()
{
std::vector <klasa> kontejner;
klasa k;
kontejner.push_back(k);
}

I got compiler error:
d:\program files\microsoft visual studio\vc98\include\xmemory(34) : error C2660: 'new' : function does not take 2 parameters
d:\program files\microsoft visual studio\vc98\include\xmemory(66) : see reference to function template instantiation 'void __cdecl std::_Construct(class klasa *,const class klasa &)' being compiled

WTF is going on here?

Beer | [beer]
GeneralRe: overloaded operator new and STL vector Pin
Christian Graus22-Oct-02 13:34
protectorChristian Graus22-Oct-02 13:34 
GeneralRe: overloaded operator new and STL vector Pin
Nemanja Trifunovic22-Oct-02 15:58
Nemanja Trifunovic22-Oct-02 15:58 
GeneralRe: overloaded operator new and STL vector Pin
Christian Graus22-Oct-02 16:01
protectorChristian Graus22-Oct-02 16:01 
GeneralRe: overloaded operator new and STL vector Pin
Nemanja Trifunovic22-Oct-02 16:10
Nemanja Trifunovic22-Oct-02 16:10 
GeneralRe: overloaded operator new and STL vector Pin
Christian Graus22-Oct-02 16:17
protectorChristian Graus22-Oct-02 16:17 
GeneralRe: overloaded operator new and STL vector Pin
Nemanja Trifunovic22-Oct-02 18:46
Nemanja Trifunovic22-Oct-02 18:46 
GeneralRe: overloaded operator new and STL vector Pin
Christian Graus22-Oct-02 18:48
protectorChristian Graus22-Oct-02 18:48 
GeneralRe: overloaded operator new and STL vector Pin
Joaquín M López Muñoz22-Oct-02 21:09
Joaquín M López Muñoz22-Oct-02 21:09 
GeneralRe: overloaded operator new and STL vector Pin
Nemanja Trifunovic23-Oct-02 5:10
Nemanja Trifunovic23-Oct-02 5:10 
GeneralRe: overloaded operator new and STL vector Pin
Nemanja Trifunovic23-Oct-02 5:36
Nemanja Trifunovic23-Oct-02 5:36 
QuestionHow to enumerate NICs? Pin
Anonymous22-Oct-02 12:11
Anonymous22-Oct-02 12:11 
GeneralDatabase and MFC! HHHEEEELLLLPPPP! Pin
MFC is the Best22-Oct-02 11:58
MFC is the Best22-Oct-02 11:58 
GeneralRe: Database and MFC! HHHEEEELLLLPPPP! Pin
Marc Clifton22-Oct-02 12:17
mvaMarc Clifton22-Oct-02 12:17 
GeneralRe: Database and MFC! HHHEEEELLLLPPPP! Pin
MFC is the Best22-Oct-02 12:43
MFC is the Best22-Oct-02 12:43 
GeneralRe: Database and MFC! HHHEEEELLLLPPPP! Pin
Marc Clifton22-Oct-02 13:13
mvaMarc Clifton22-Oct-02 13:13 
GeneralRe: Database and MFC! HHHEEEELLLLPPPP! Pin
Alexandru Savescu22-Oct-02 20:53
Alexandru Savescu22-Oct-02 20:53 
Questionedit box- change colors? Pin
jimNLX22-Oct-02 11:51
jimNLX22-Oct-02 11:51 

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.