Click here to Skip to main content
15,905,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Control camera Pin
jerry0davis6-Apr-05 22:52
jerry0davis6-Apr-05 22:52 
GeneralRe: Control camera Pin
jerry0davis6-Apr-05 22:57
jerry0davis6-Apr-05 22:57 
GeneralGet Serial HDD, encoding and save !!! Pin
RoyalVN6-Apr-05 22:30
RoyalVN6-Apr-05 22:30 
GeneralRe: Get Serial HDD, encoding and save !!! Pin
BadJerry7-Apr-05 1:18
BadJerry7-Apr-05 1:18 
GeneralInstallShield Pin
charu1236-Apr-05 22:19
charu1236-Apr-05 22:19 
Generalifstream operator>> Pin
Cedric Moonen6-Apr-05 21:27
Cedric Moonen6-Apr-05 21:27 
GeneralRe: ifstream operator>> Pin
NewbieStats6-Apr-05 21:31
NewbieStats6-Apr-05 21:31 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 21:39
Cedric Moonen6-Apr-05 21:39 
No, I'm not using getline but operator>>. In fact, the operator is redifined to accept my own classes, something loke that:

ifstream& operator>>(ifstream& i_stream,CMyClass MyClass)
{
   i_stream>>MyClass.Data1;
   i_stream>>MyClass.Data2;
   ....
   ....
   return i_stream;
}


But inside this function, I want to throw an exception when there is an error (for example end of file). So, what happens when i_stream>> is called and the stream is at the end of the file ? Is an exception thrown or do I need to check the errors myself each time (quite a lot of code 'cause a lot of data inside CMyClass) ? Or maybe I can do it just once at the end of the function, is that a valid solution ?
GeneralRe: ifstream operator>> Pin
toxcct6-Apr-05 21:45
toxcct6-Apr-05 21:45 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 21:55
Cedric Moonen6-Apr-05 21:55 
GeneralRe: ifstream operator>> Pin
NewbieStats6-Apr-05 21:45
NewbieStats6-Apr-05 21:45 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 21:51
Cedric Moonen6-Apr-05 21:51 
GeneralRe: ifstream operator>> Pin
NewbieStats6-Apr-05 21:53
NewbieStats6-Apr-05 21:53 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 22:02
Cedric Moonen6-Apr-05 22:02 
GeneralRe: ifstream operator>> Pin
toxcct6-Apr-05 21:54
toxcct6-Apr-05 21:54 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 21:57
Cedric Moonen6-Apr-05 21:57 
GeneralRe: ifstream operator>> Pin
NewbieStats6-Apr-05 22:00
NewbieStats6-Apr-05 22:00 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 22:07
Cedric Moonen6-Apr-05 22:07 
GeneralRe: ifstream operator>> Pin
toxcct6-Apr-05 22:00
toxcct6-Apr-05 22:00 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 22:05
Cedric Moonen6-Apr-05 22:05 
GeneralRe: ifstream operator>> Pin
toxcct6-Apr-05 22:13
toxcct6-Apr-05 22:13 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 22:18
Cedric Moonen6-Apr-05 22:18 
GeneralRe: ifstream operator>> Pin
toxcct6-Apr-05 22:37
toxcct6-Apr-05 22:37 
GeneralRe: ifstream operator>> Pin
Cedric Moonen6-Apr-05 22:47
Cedric Moonen6-Apr-05 22:47 
GeneralRe: ifstream operator>> Pin
toxcct6-Apr-05 21:33
toxcct6-Apr-05 21: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.