Click here to Skip to main content
15,895,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pure virtual functions - an example for you. Pin
Iain Clarke, Warrior Programmer17-Sep-09 23:00
Iain Clarke, Warrior Programmer17-Sep-09 23:00 
QuestionDifferentiating SHUTDOWN and RESTART ? Pin
Kushagra Tiwari17-Sep-09 20:29
Kushagra Tiwari17-Sep-09 20:29 
AnswerRe: Differentiating SHUTDOWN and RESTART ? Pin
«_Superman_»17-Sep-09 20:42
professional«_Superman_»17-Sep-09 20:42 
GeneralRe: Differentiating SHUTDOWN and RESTART ? Pin
Kushagra Tiwari17-Sep-09 20:46
Kushagra Tiwari17-Sep-09 20:46 
QuestionRe: Differentiating SHUTDOWN and RESTART ? Pin
Kushagra Tiwari17-Sep-09 22:25
Kushagra Tiwari17-Sep-09 22:25 
GeneralRe: Differentiating SHUTDOWN and RESTART ? Pin
David Crow18-Sep-09 6:26
David Crow18-Sep-09 6:26 
GeneralRe: Differentiating SHUTDOWN and RESTART ? Pin
kilt21-Sep-09 0:45
kilt21-Sep-09 0:45 
Questionusing boost::bind cause error prj0002 Pin
fley_fly17-Sep-09 19:58
fley_fly17-Sep-09 19:58 
Hello people!


I am a new boost user, and I am trying to implement a console for a
game, which binds console commands to functions. These functions can
come from different objects and this is why I decided to try using boost.


I am using Visual Studio 2005 + SP1.


I have something like this:


//all functions are of generic structure 
//the return nothing and they take a vector of arguments 
typedef boost::function1< void, std::vector<std::string>& > funcHolder; 


//I also have a hash table, which holds function references and the 
//relative commands: 


std::map<std::string, funcHolder> commands; 


//Finally I have a function: 
void Console::addCommand(const String &command, funcHolder f) 
{ 
  std::map<String, funcHolder>::iterator t = commands.find(command); 
  if(t == commands.end()) commands.insert( make_pair(command, f) ); 
  else commands[command] = f; 
} 


All of these things are members of a Console class. So once I added 
these, I tried adding this line to the constructor: 


addCommand("clear", boost::bind(&Console::clear, this); 


//clear method 
void Console::clear( vector<std::string>& args ) 
{ 
   lines.clear(); 
} 


During compilation I get C4180 warnings. I have heard that those are due
to VS8.0 SP1 compiler bugs, so I ignore them but then I get a following
error:


Project : error PRJ0002 : Error result 1 returned from 'C:\Program
Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.


Compiler basically crashes.


Any ideas what might be wrong?


I thank everyone in advance,
AnswerRe: using boost::bind cause error prj0002 Pin
Stuart Dootson17-Sep-09 20:50
professionalStuart Dootson17-Sep-09 20:50 
QuestionOutlook Automation Pin
john563217-Sep-09 19:29
john563217-Sep-09 19:29 
QuestionWM_LBUTTONUP does not trigger, please help Pin
Isuru_Perera17-Sep-09 19:27
Isuru_Perera17-Sep-09 19:27 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Code-o-mat17-Sep-09 20:36
Code-o-mat17-Sep-09 20:36 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Romualdas Cukuras17-Sep-09 20:36
Romualdas Cukuras17-Sep-09 20:36 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Isuru_Perera17-Sep-09 22:15
Isuru_Perera17-Sep-09 22:15 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Iain Clarke, Warrior Programmer17-Sep-09 23:10
Iain Clarke, Warrior Programmer17-Sep-09 23:10 
GeneralRe: WM_LBUTTONUP does not trigger, please help Pin
Isuru_Perera18-Sep-09 1:42
Isuru_Perera18-Sep-09 1:42 
GeneralRe: WM_LBUTTONUP does not trigger, please help Pin
Iain Clarke, Warrior Programmer18-Sep-09 4:22
Iain Clarke, Warrior Programmer18-Sep-09 4:22 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
ouly23-Sep-09 17:55
ouly23-Sep-09 17:55 
QuestionHow to visually click the radio button in propertypage. [modified] Pin
DevelopmentNoob17-Sep-09 15:24
DevelopmentNoob17-Sep-09 15:24 
AnswerRe: How to visually click the radio button in propertypage. Pin
David Crow17-Sep-09 16:40
David Crow17-Sep-09 16:40 
GeneralRe: How to visually click the radio button in propertypage. Pin
DevelopmentNoob17-Sep-09 16:53
DevelopmentNoob17-Sep-09 16:53 
AnswerRe: How to visually click the radio button in propertypage. Pin
vasu_sri17-Sep-09 19:23
vasu_sri17-Sep-09 19:23 
GeneralRe: How to visually click the radio button in propertypage. Pin
vasu_sri17-Sep-09 19:27
vasu_sri17-Sep-09 19:27 
QuestionMS09-035 Zero Day bug Pin
fredsparkle17-Sep-09 11:29
fredsparkle17-Sep-09 11:29 
AnswerRe: MS09-035 Zero Day bug Pin
Randor 17-Sep-09 12:33
professional Randor 17-Sep-09 12:33 

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.