Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Refresh a form in C++ Builder Pin
David Crow26-Jun-09 7:57
David Crow26-Jun-09 7:57 
GeneralRe: Refresh a form in C++ Builder Pin
David21u226-Jun-09 8:01
David21u226-Jun-09 8:01 
AnswerRe: Refresh a form in C++ Builder Pin
David Crow26-Jun-09 8:12
David Crow26-Jun-09 8:12 
GeneralRe: Refresh a form in C++ Builder Pin
David González G26-Jun-09 9:05
David González G26-Jun-09 9:05 
GeneralRe: Refresh a form in C++ Builder Pin
favorxx26-Jun-09 21:15
favorxx26-Jun-09 21:15 
GeneralRe: Refresh a form in C++ Builder Pin
David González G26-Jun-09 22:46
David González G26-Jun-09 22:46 
GeneralRe: Refresh a form in C++ Builder Pin
favorxx27-Jun-09 2:23
favorxx27-Jun-09 2:23 
GeneralRe: Refresh a form in C++ Builder Pin
favorxx27-Jun-09 6:40
favorxx27-Jun-09 6:40 
GeneralRe: Refresh a form in C++ Builder Pin
David González G27-Jun-09 11:35
David González G27-Jun-09 11:35 
GeneralRe: Refresh a form in C++ Builder Pin
favorxx27-Jun-09 16:59
favorxx27-Jun-09 16:59 
Questionthe use of 'new' Pin
thelonesquirrely26-Jun-09 5:40
thelonesquirrely26-Jun-09 5:40 
AnswerRe: the use of 'new' Pin
Rajesh R Subramanian26-Jun-09 5:58
professionalRajesh R Subramanian26-Jun-09 5:58 
AnswerRe: the use of 'new' Pin
Chris Losinger26-Jun-09 7:51
professionalChris Losinger26-Jun-09 7:51 
GeneralRe: the use of 'new' Pin
CPallini26-Jun-09 8:54
mveCPallini26-Jun-09 8:54 
AnswerRe: the use of 'new' Pin
Nemanja Trifunovic26-Jun-09 9:25
Nemanja Trifunovic26-Jun-09 9:25 
GeneralRe: the use of 'new' Pin
CPallini26-Jun-09 9:51
mveCPallini26-Jun-09 9:51 
GeneralRe: the use of 'new' Pin
norish26-Jun-09 16:21
norish26-Jun-09 16:21 
AnswerRe: the use of 'new' Pin
Joe Woodbury27-Jun-09 17:48
professionalJoe Woodbury27-Jun-09 17:48 
QuestionNTGraph Zoom [modified] Pin
KevinVS26-Jun-09 4:26
KevinVS26-Jun-09 4:26 
QuestionRe: NTGraph Zoom Pin
CPallini26-Jun-09 5:00
mveCPallini26-Jun-09 5:00 
Questionhow to change data of struture object in file Pin
ashish8patil26-Jun-09 4:11
ashish8patil26-Jun-09 4:11 
Hello All ,
Sorry i am posting all code ,
i this code it is writting & reading stuct data ,BUt not changing that data i want change that data



#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;

struct MyRecord {
char name[80];
double balance;
unsigned long account_num;
};

int main()
{
struct MyRecord acc;

strcpy(acc.name, "R");
acc.balance = 1.3;
acc.account_num = 34;

ofstream outbal("balance", ios::out | ios::binary);
if(!outbal) {
cout << "Cannot open file.\n";
return 1;
}

outbal.write((char *) &acc, sizeof(struct MyRecord));
outbal.close();

ifstream inbal("balance", ios::in | ios::binary);
if(!inbal) {
cout << "Cannot open file.\n";
return 1;
}

inbal.read((char *) &acc, sizeof(struct MyRecord));

cout << acc.name << endl;
cout << "Account # " << acc.account_num;
cout.precision(2);
cout.setf(ios::fixed);
cout << endl << "Balance: $" << acc.balance;

inbal.close();
return 0;
}
QuestionRe: how to change data of struture object in file Pin
David Crow26-Jun-09 4:40
David Crow26-Jun-09 4:40 
QuestionRe: how to change data of struture object in file Pin
CPallini26-Jun-09 4:56
mveCPallini26-Jun-09 4:56 
QuestionProblem using MsiGetProductInfo for retreving the product version Pin
V K 226-Jun-09 2:48
V K 226-Jun-09 2:48 
AnswerRe: Problem using MsiGetProductInfo for retreving the product version Pin
Rajesh R Subramanian26-Jun-09 3:26
professionalRajesh R Subramanian26-Jun-09 3:26 

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.