Click here to Skip to main content
15,915,094 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Get system time Pin
Hamid_RT20-Mar-07 2:59
Hamid_RT20-Mar-07 2:59 
QuestionOperator= Overloading Pin
od@ananzi.co.za19-Mar-07 7:12
od@ananzi.co.za19-Mar-07 7:12 
AnswerRe: Operator= Overloading Pin
Roger Stoltz19-Mar-07 7:20
Roger Stoltz19-Mar-07 7:20 
GeneralRe: Operator= Overloading Pin
Nemanja Trifunovic19-Mar-07 7:23
Nemanja Trifunovic19-Mar-07 7:23 
GeneralRe: Operator= Overloading Pin
Roger Stoltz19-Mar-07 7:26
Roger Stoltz19-Mar-07 7:26 
GeneralRe: Operator= Overloading Pin
od@ananzi.co.za20-Mar-07 4:37
od@ananzi.co.za20-Mar-07 4:37 
AnswerRe: Operator= Overloading Pin
Nemanja Trifunovic19-Mar-07 7:22
Nemanja Trifunovic19-Mar-07 7:22 
QuestionVC++ 6 to VS 2005 Porting problem. Pin
Eurosid19-Mar-07 6:56
Eurosid19-Mar-07 6:56 
I'm porting a legacy app. This code was fine in VC6, but VS2005 doesn't
like it:

struct CColumnBool
{
std::vector<bool> m_vBoolData;

CColumnBool()
{
m_vBoolData.clear();
};

bool& operator[](UINT uiRow)
{
return m_vBoolData[uiRow]; // <--- error on this line...
};
const bool& operator[](UINT uiRow) const
{
return m_vBoolData[uiRow];
};
};

The error is this:
error C2440: 'return' : cannot convert from 'std::_Vb_reference<_MycontTy>' to 'bool &'
with
[
_MycontTy=std::vector>
]

The weird thing is that this code does NOT generate the same error:

struct CColumnInt
{
std::vector<int> m_vIntData;

CColumnInt()
{
m_vIntData.clear();
};

int& operator[](UINT uiRow)
{
return m_vIntData[uiRow];
};
const int& operator[](UINT uiRow) const
{
return m_vIntData[uiRow];
};
};

C2440 is a type conversion error, of course. MSDN lists several
causes for this, but I don't see where they apply. Any ideas
how to fix this?

AnswerRe: VC++ 6 to VS 2005 Porting problem. Pin
Nougat H.19-Mar-07 7:04
Nougat H.19-Mar-07 7:04 
GeneralRe: VC++ 6 to VS 2005 Porting problem. Pin
Eurosid19-Mar-07 7:18
Eurosid19-Mar-07 7:18 
AnswerRe: VC++ 6 to VS 2005 Porting problem. Pin
Mike Dimmick19-Mar-07 9:16
Mike Dimmick19-Mar-07 9:16 
GeneralRe: VC++ 6 to VS 2005 Porting problem. Pin
Eurosid20-Mar-07 2:34
Eurosid20-Mar-07 2:34 
QuestionShellExecute a local html-file Pin
Niklas L19-Mar-07 6:52
Niklas L19-Mar-07 6:52 
AnswerRe: ShellExecute a local html-file Pin
toxcct19-Mar-07 7:23
toxcct19-Mar-07 7:23 
GeneralRe: ShellExecute a local html-file Pin
Niklas L19-Mar-07 9:51
Niklas L19-Mar-07 9:51 
GeneralRe: ShellExecute a local html-file Pin
toxcct19-Mar-07 10:33
toxcct19-Mar-07 10:33 
GeneralRe: ShellExecute a local html-file Pin
Niklas L19-Mar-07 12:18
Niklas L19-Mar-07 12:18 
GeneralRe: ShellExecute a local html-file Pin
toxcct19-Mar-07 12:23
toxcct19-Mar-07 12:23 
GeneralRe: ShellExecute a local html-file Pin
Niklas L19-Mar-07 12:45
Niklas L19-Mar-07 12:45 
AnswerRe: ShellExecute a local html-file Pin
Mike Dimmick19-Mar-07 9:21
Mike Dimmick19-Mar-07 9:21 
Questionclass wizard in visual studio 2005 Pin
embtech19-Mar-07 6:01
embtech19-Mar-07 6:01 
AnswerRe: class wizard in visual studio 2005 Pin
David Crow19-Mar-07 6:18
David Crow19-Mar-07 6:18 
QuestionResizable CDialog Bar Pin
SRogers8819-Mar-07 5:43
SRogers8819-Mar-07 5:43 
Questionaccessing 8 bit image bits Pin
Jim Crafton19-Mar-07 5:24
Jim Crafton19-Mar-07 5:24 
AnswerRe: accessing 8 bit image bits Pin
PJ Arends19-Mar-07 6:13
professionalPJ Arends19-Mar-07 6:13 

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.