Click here to Skip to main content
15,917,061 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionHelp Required With Ordered list.cc part 1 Pin
The_Lone_Wolf3-Nov-05 4:53
The_Lone_Wolf3-Nov-05 4:53 
QuestionCan I resize my tabs within an SDI application? Pin
SheriMarie3-Nov-05 3:15
SheriMarie3-Nov-05 3:15 
AnswerRe: Can I resize my tabs within an SDI application? Pin
Sheng Jiang 蒋晟4-Nov-05 7:13
Sheng Jiang 蒋晟4-Nov-05 7:13 
QuestionOverloading [] to handle multidimentional arrays Pin
Pegasus Kiddo3-Nov-05 0:03
Pegasus Kiddo3-Nov-05 0:03 
AnswerRe: Overloading [] to handle multidimentional arrays Pin
toxcct3-Nov-05 0:16
toxcct3-Nov-05 0:16 
GeneralRe: Overloading [] to handle multidimentional arrays Pin
S. Senthil Kumar4-Nov-05 22:34
S. Senthil Kumar4-Nov-05 22:34 
AnswerRe: Overloading [] to handle multidimentional arrays Pin
Kevin McFarlane6-Nov-05 4:46
Kevin McFarlane6-Nov-05 4:46 
QuestionOverwriting struct in binary file Pin
scrname2-Nov-05 19:03
scrname2-Nov-05 19:03 
I have a question. I wrote and array of 5 structs into a binary file. I need to be able to go to a specific position in a binary file and overwrite that struct with another. I have tried it but when i go to overwrite the struct the ones before it all the data is screwed up.Can anyone help me on how to overwrite a specific person in the file.

struct PERSON
{
int age;
int weight;
char name[25];
};
void write_names() //WRITES 5 PEOPLE TO THE FILE
{
ofstream out;
PERSON p[5];
int ct;

p[0].age = 1;
p[0].weight = 1;
strcpy(p[0].name, "Num_1");
p[1].age = 2;
p[1].weight = 2;
strcpy(p[1].name, "Num_2");
p[2].age = 3;
p[2].weight = 3;
strcpy(p[2].name, "Num_3");
p[3].age = 4;
p[3].weight = 4;
strcpy(p[3].name, "Num_4");
p[4].age = 5;
p[4].weight = 5;
strcpy(p[4].name, "Num_5");

out.open("file.dta", ios::binary);

for (ct=0; ct<5; ct++)
out.write((char*)& p[ct], sizeof(p[ct]));

out.close();
}
void show_names() //SHOW ALL THE PEOPLE IN THE FILE
{
ifstream f;
f.open("file.dta", ios::binary);
PERSON p[10];
int ct;
int num = 0;

while(!f.eof())
{
f.read((char*)& p[num], sizeof(p[num]));
num++;
}
num--;

for(ct=0; ct
AnswerRe: Overwriting struct in binary file Pin
willy_total3-Nov-05 8:55
willy_total3-Nov-05 8:55 
QuestionNeed HELP with code Pin
pacificeve2-Nov-05 13:24
pacificeve2-Nov-05 13:24 
QuestionLauching jar as a process from C++ Pin
carsten8011-Nov-05 21:04
carsten8011-Nov-05 21:04 
AnswerRe: Lauching jar as a process from C++ Pin
toxcct1-Nov-05 23:45
toxcct1-Nov-05 23:45 
QuestionRe: Lauching jar as a process from C++ Pin
carsten8012-Nov-05 3:07
carsten8012-Nov-05 3:07 
AnswerRe: Lauching jar as a process from C++ Pin
toxcct2-Nov-05 3:27
toxcct2-Nov-05 3:27 
AnswerRe: Lauching jar as a process from C++ Pin
code-frog4-Nov-05 19:12
professionalcode-frog4-Nov-05 19:12 
QuestionHow to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu30-Oct-05 23:18
CooperWu30-Oct-05 23:18 
AnswerRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu30-Oct-05 23:22
CooperWu30-Oct-05 23:22 
AnswerRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
toxcct31-Oct-05 0:02
toxcct31-Oct-05 0:02 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
Sheng Jiang 蒋晟31-Oct-05 6:07
Sheng Jiang 蒋晟31-Oct-05 6:07 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu31-Oct-05 22:30
CooperWu31-Oct-05 22:30 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
Johann Gerell31-Oct-05 19:40
Johann Gerell31-Oct-05 19:40 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu31-Oct-05 22:30
CooperWu31-Oct-05 22:30 
QuestionSocket Programming question Pin
mdykstra30-Oct-05 6:48
mdykstra30-Oct-05 6:48 
AnswerRe: Socket Programming question Pin
willy_total31-Oct-05 9:33
willy_total31-Oct-05 9:33 
Questionsolve this problem! Pin
sam o neil29-Oct-05 21:02
sam o neil29-Oct-05 21:02 

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.