Click here to Skip to main content
15,914,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: EnumProcesses() don't return all processses! Pin
Eugen Podsypalnikov13-Sep-10 0:34
Eugen Podsypalnikov13-Sep-10 0:34 
AnswerRe: EnumProcesses() don't return all processses! Pin
Joe Woodbury5-Sep-10 12:32
professionalJoe Woodbury5-Sep-10 12:32 
QuestionRe: EnumProcesses() don't return all processses! Pin
David Crow7-Sep-10 6:02
David Crow7-Sep-10 6:02 
QuestionHow to set the default font name when I call ChooseFont(..) ? Pin
wangningyu4-Sep-10 4:39
wangningyu4-Sep-10 4:39 
AnswerRe: How to set the default font name when I call ChooseFont(..) ? Pin
Luc Pattyn4-Sep-10 5:46
sitebuilderLuc Pattyn4-Sep-10 5:46 
GeneralRe: How to set the default font name when I call ChooseFont(..) ? Pin
wangningyu4-Sep-10 5:55
wangningyu4-Sep-10 5:55 
GeneralRe: How to set the default font name when I call ChooseFont(..) ? Pin
Luc Pattyn4-Sep-10 6:04
sitebuilderLuc Pattyn4-Sep-10 6:04 
QuestionBinary file problem Pin
ganesh_IT3-Sep-10 19:38
ganesh_IT3-Sep-10 19:38 
Hi guys, i try to write my data into a binary file, but j have some problem in it . I dont know what happening inside..

//////////////////////Here is my code/////////////////////////////
class Person{
   char Name[50];
   char Address[10;
   bool sex;
   short age;
public:
   Person();
   Person(char* name, char *address, bool sex, short age);
   const char* GetName() const;
   const char* GetAddress() const;
 };
ostream& operator<<(ostream& out, const Person&p)
{
   out.write(reinterpret_cast<const char*>(&ap), sizeof(p));
   return out;
}
istream& operator>>(istream& in, Person &p)
{
   in.read(reinterpret_cast<char*>(&p), sizeof(p));
   return in;
}
//Person detail reading and writing is performed well 

//////////////////AccountProperty Class///////////////////////////////
class Account_Property{
   int account_number;
   double amount;
   bool account_type;
   Person p;
public:
   Account_Property();
   Account_Property(Person p, int ac_num, bool ac_type, double amt);
   int GetAccountNumber()const;
   double GetAmount()const;
};
ostream &operator<<(ostream &out, const Account_Property &ap)
{
    out.write(reinterpret_cast<const char*>(&ap), sizeof(ap));
    return out;
} 
istream& operator>>(istream &in, Account_Property &ap)
{
    in.read(reinterpret_cast<char*>(&ap), sizeof(ap));
    return in;
}
//Account_Property readin writing is not performed perfectly ,whats the reason some one explain me.....

Thanks in Advance
AnswerRe: Binary file problem Pin
Niklas L3-Sep-10 21:20
Niklas L3-Sep-10 21:20 
AnswerRe: Binary file problem Pin
Dave Kerr3-Sep-10 23:08
mentorDave Kerr3-Sep-10 23:08 
Question[Solved] Object render order for proper depth (OpenGL) [modified] Pin
SilentDude56k3-Sep-10 11:09
SilentDude56k3-Sep-10 11:09 
AnswerRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins3-Sep-10 11:19
Dave Calkins3-Sep-10 11:19 
GeneralRe: Object render order for proper depth (OpenGL) Pin
SilentDude56k3-Sep-10 11:29
SilentDude56k3-Sep-10 11:29 
GeneralRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins3-Sep-10 14:03
Dave Calkins3-Sep-10 14:03 
GeneralRe: Object render order for proper depth (OpenGL) Pin
SilentDude56k3-Sep-10 14:36
SilentDude56k3-Sep-10 14:36 
GeneralRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins3-Sep-10 14:53
Dave Calkins3-Sep-10 14:53 
GeneralRe: Object render order for proper depth (OpenGL) Pin
SilentDude56k3-Sep-10 20:15
SilentDude56k3-Sep-10 20:15 
GeneralRe: Object render order for proper depth (OpenGL) Pin
Dave Calkins4-Sep-10 2:03
Dave Calkins4-Sep-10 2:03 
AnswerRe: [Solved] Object render order for proper depth (OpenGL) Pin
Cedric Moonen3-Sep-10 22:19
Cedric Moonen3-Sep-10 22:19 
QuestionDeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
MKC0023-Sep-10 3:57
MKC0023-Sep-10 3:57 
QuestionRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
David Crow3-Sep-10 4:07
David Crow3-Sep-10 4:07 
QuestionRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
Niklas L3-Sep-10 4:10
Niklas L3-Sep-10 4:10 
AnswerRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
MKC0023-Sep-10 6:45
MKC0023-Sep-10 6:45 
QuestionRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work PinPopular
David Crow3-Sep-10 7:11
David Crow3-Sep-10 7:11 
AnswerRe: DeviceIoControl with IOCTL_DISK_GET_DRIVE_LAYOUT does not work Pin
Aescleal3-Sep-10 20:15
Aescleal3-Sep-10 20:15 

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.