Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question about WM_DESTROY Pin
KellyR23-May-07 4:05
KellyR23-May-07 4:05 
QuestionRe: Question about WM_DESTROY Pin
David Crow23-May-07 3:39
David Crow23-May-07 3:39 
JokeRe: Question about WM_DESTROY Pin
Arman S.23-May-07 3:43
Arman S.23-May-07 3:43 
GeneralRe: Question about WM_DESTROY Pin
KellyR23-May-07 4:03
KellyR23-May-07 4:03 
AnswerRe: Question about WM_DESTROY Pin
James R. Twine23-May-07 3:44
James R. Twine23-May-07 3:44 
GeneralRe: Question about WM_DESTROY Pin
David Crow23-May-07 3:46
David Crow23-May-07 3:46 
QuestionC++ newbie here, some help is needed. Pin
C_Zealot23-May-07 3:16
C_Zealot23-May-07 3:16 
AnswerRe: C++ newbie here, some help is needed. Pin
Arman S.23-May-07 3:39
Arman S.23-May-07 3:39 
Generally, you need to learn C++ to fully understand what is happening. Anyway, the code is simple and a common way of opening a file [well, trying to open].


ifstream in(argv[1], ios_base::binary);

Here you declare and define an object whose type is ifstream. ifstream is a class responsible for file input operations. You pass the path and an optional ios::binary arguments to its constructor. Ok, to check whether the operation succeeded, you can do one of the following;

// either this way
if (in)
{
// success
}

// or this way
if (in.is_open())
{
// success
}


In the first case, the overloaded operator bpol gets invoked implicitly. In the second case, you explicitlly call a function [which returns bool].


--
=====
Arman

GeneralRe: C++ newbie here, some help is needed. Pin
C_Zealot23-May-07 12:47
C_Zealot23-May-07 12:47 
AnswerRe: C++ newbie here, some help is needed. Pin
James R. Twine23-May-07 3:43
James R. Twine23-May-07 3:43 
GeneralRe: C++ newbie here, some help is needed. Pin
C_Zealot23-May-07 12:47
C_Zealot23-May-07 12:47 
AnswerRe: C++ newbie here, some help is needed. Pin
David Crow23-May-07 3:44
David Crow23-May-07 3:44 
GeneralRe: C++ newbie here, some help is needed. Pin
C_Zealot23-May-07 12:47
C_Zealot23-May-07 12:47 
AnswerRe: C++ newbie here, some help is needed. [modified] Pin
Michael Sadlon23-May-07 8:33
Michael Sadlon23-May-07 8:33 
GeneralRe: C++ newbie here, some help is needed. Pin
C_Zealot23-May-07 12:46
C_Zealot23-May-07 12:46 
Questionloop help Pin
klutez12323-May-07 3:06
klutez12323-May-07 3:06 
AnswerRe: loop help Pin
David Crow23-May-07 3:54
David Crow23-May-07 3:54 
QuestionCREATESTRUCT& cs problem Pin
prithaa23-May-07 1:48
prithaa23-May-07 1:48 
AnswerRe: CREATESTRUCT& cs problem Pin
Arman S.23-May-07 3:48
Arman S.23-May-07 3:48 
AnswerRe: CREATESTRUCT& cs problem Pin
Mark Salsbery23-May-07 5:45
Mark Salsbery23-May-07 5:45 
GeneralRe: CREATESTRUCT& cs problem Pin
prithaa23-May-07 18:15
prithaa23-May-07 18:15 
GeneralRe: CREATESTRUCT& cs problem Pin
Mark Salsbery24-May-07 4:51
Mark Salsbery24-May-07 4:51 
QuestionMy class wizard is empty Pin
garfield18523-May-07 1:36
garfield18523-May-07 1:36 
AnswerRe: My class wizard is empty Pin
Cedric Moonen23-May-07 1:42
Cedric Moonen23-May-07 1:42 
GeneralRe: My class wizard is empty Pin
garfield18523-May-07 1:47
garfield18523-May-07 1:47 

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.