Click here to Skip to main content
16,005,417 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Loading Problem Pin
Joaquín M López Muñoz7-Feb-02 7:53
Joaquín M López Muñoz7-Feb-02 7:53 
GeneralRe: Loading Problem Pin
Sonu Kapoor7-Feb-02 8:40
Sonu Kapoor7-Feb-02 8:40 
GeneralRe: Loading Problem Pin
User 66587-Feb-02 8:53
User 66587-Feb-02 8:53 
GeneralRe: Loading Problem Pin
Nish Nishant7-Feb-02 8:55
sitebuilderNish Nishant7-Feb-02 8:55 
GeneralRe: Loading Problem Pin
Sonu Kapoor7-Feb-02 8:59
Sonu Kapoor7-Feb-02 8:59 
GeneralRe: Loading Problem Pin
Joaquín M López Muñoz7-Feb-02 9:09
Joaquín M López Muñoz7-Feb-02 9:09 
GeneralRe: Loading Problem Pin
Sonu Kapoor7-Feb-02 9:14
Sonu Kapoor7-Feb-02 9:14 
GeneralSams book on visual C++ Pin
Rajveer7-Feb-02 5:31
Rajveer7-Feb-02 5:31 
I'm trying to learn using "Sams Teach Yourself Visual C++ 6 in 21 Days". Has anybody read that? I'm finding that there are a lot of mistakes in the sample code in the book. For example, I took this code exactly out of the book:

void CDialogsDlg::OnYesnocancel()
{
// TODO: Add your control notification handler code here

int iResults;

iResults = MessageBox("Press the Yes, No, or Cancel button", "Yes, No, Cancel Dialog",
MB_YESNOCANCEL | MB_ICONINFORMATION);

switch(iResults)
{
case IDYES:
m_sResults = "Yes! Yes! Yes!";
break;
case IDNO:
m_sResults = "No, no, no, no, no.";
break;
case IDCANCEL:
m_sResults = "Sorry, canceled.";
break;
}
UpdateData(FALSE);
}

and I got these errors:

--------------------Configuration: Dialogs - Win32 Debug--------------------
Compiling...
DialogsDlg.cpp
C:\Windows\Desktop\Dialogs\DialogsDlg.cpp(185) : error C2065: 'm_sResults' : undeclared identifier
C:\Windows\Desktop\Dialogs\DialogsDlg.cpp(185) : error C2440: '=' : cannot convert from 'char [15]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
C:\Windows\Desktop\Dialogs\DialogsDlg.cpp(188) : error C2440: '=' : cannot convert from 'char [20]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
C:\Windows\Desktop\Dialogs\DialogsDlg.cpp(191) : error C2440: '=' : cannot convert from 'char [17]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.

DialogsDlg.obj - 4 error(s), 0 warning(s)

Am I forgetting to do something, because I've doubled checked the code and its exactly what appears in the book. This is happening to me for every single code in the book. Can anybody recommend a better book?
GeneralRe: Sams book on visual C++ Pin
Jon Hulatt7-Feb-02 6:18
Jon Hulatt7-Feb-02 6:18 
GeneralRe: C2664 Pin
7-Feb-02 4:52
suss7-Feb-02 4:52 
GeneralRe: C2664 Pin
Jon Hulatt7-Feb-02 5:04
Jon Hulatt7-Feb-02 5:04 
GeneralRe: C2664 Pin
Giles7-Feb-02 9:40
Giles7-Feb-02 9:40 
GeneralRe: C2664 Pin
Christian Graus7-Feb-02 9:51
protectorChristian Graus7-Feb-02 9:51 
GeneraleVC Image Zoom Problem Pin
7-Feb-02 4:36
suss7-Feb-02 4:36 
GeneraliCListView and CTreeView Pin
7-Feb-02 3:07
suss7-Feb-02 3:07 
GeneralRe: iCListView and CTreeView Pin
Jon Hulatt7-Feb-02 4:42
Jon Hulatt7-Feb-02 4:42 
Questionhow to compile win32 program in bcb 5.0 Pin
Johndotcom7-Feb-02 3:03
Johndotcom7-Feb-02 3:03 
AnswerRe: how to compile win32 program in bcb 5.0 Pin
Carlos Antollini7-Feb-02 3:12
Carlos Antollini7-Feb-02 3:12 
GeneralRe: how to compile win32 program in bcb 5.0 Pin
Johndotcom7-Feb-02 16:21
Johndotcom7-Feb-02 16:21 
GeneralRe: how to compile win32 program in bcb 5.0 Pin
Carlos Antollini8-Feb-02 2:35
Carlos Antollini8-Feb-02 2:35 
GeneralRe: how to compile win32 program in bcb 5.0 Pin
Johndotcom8-Feb-02 18:28
Johndotcom8-Feb-02 18:28 
GeneralCan't find the clrscr() program Pin
Fredrik N7-Feb-02 2:47
Fredrik N7-Feb-02 2:47 
GeneralRe: Can't find the clrscr() program Pin
Carlos Antollini7-Feb-02 3:06
Carlos Antollini7-Feb-02 3:06 
GeneralRe: Can't find the clrscr() program Pin
Atul Dharne7-Feb-02 3:26
Atul Dharne7-Feb-02 3:26 
GeneralA simple query on VC++ Pin
7-Feb-02 2:12
suss7-Feb-02 2:12 

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.