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

Managed C++/CLI

 
QuestionRuntime error for OpenFileDialog Class in .NET 2005 Pin
priyank_ldce13-May-07 6:13
priyank_ldce13-May-07 6:13 
AnswerRe: Runtime error for OpenFileDialog Class in .NET 2005 Pin
Mark Salsbery13-May-07 6:33
Mark Salsbery13-May-07 6:33 
QuestionBasic terminology questions Pin
J_E_D_I12-May-07 7:41
J_E_D_I12-May-07 7:41 
AnswerRe: Basic terminology questions Pin
CPallini12-May-07 8:26
mveCPallini12-May-07 8:26 
AnswerRe: Basic terminology questions Pin
Mark Salsbery12-May-07 13:59
Mark Salsbery12-May-07 13:59 
AnswerRe: Basic terminology questions Pin
Michael Dunn13-May-07 6:11
sitebuilderMichael Dunn13-May-07 6:11 
GeneralRe: Basic terminology questions Pin
Mark Salsbery13-May-07 6:29
Mark Salsbery13-May-07 6:29 
Questionsave xml...help please Pin
lavy288312-May-07 5:06
lavy288312-May-07 5:06 
Hello....I have this function(printinstance()) who generate me randomly boxes(whith another function) with width,height and depth, and I want to save the results in XML, but it only save me just the last box generated...can you figure out what it is the problem in my code please...I have to do this very quick and I am a beginer in XML.

where f-is the first box generated and l-is the last box generated
void printinstance(item *f, item *l, itype W, itype H, itype D)
{ int p,Wcont,Hcont,Dcont;
int const max=1000;
item *i,*j;
itype x1, y1, z1,x2, y2, z2;
stype vol, totvol;
int notip,po;

Wcont=(int)(W);
Hcont=(int)(H);
Dcont=(int)(D);

for (i=f;i<=l;i++)
{
notip=1;
x1 = i->dx; y1 = i->dy; z1 = i->dz;
for (j=i+1;j<=l;j++)
{
if ((i->dx==j->dx)&&(i->dy==j->dy)&&(i->dz==j->dz)) notip++;
}
p=1;
for (j=f;j if ((j->dx==i->dx)&&(j->dy==i->dy)&&(j->dz==i->dz))
{
p=0;
break;
}
if (p)
{
x1=i->dx;
y1=i->dy;
z1=i->dz;
XmlTextWriter^ writer = gcnew XmlTextWriter("d:\\contload.xml",Encoding::UTF8);
writer->Formatting = Formatting::Indented;
writer->Indentation=4;
writer->WriteStartDocument();
writer->WriteStartElement("ContainerSolution");

writer->WriteStartElement("ContainerDimensions");
writer->WriteAttributeString("ContainerWidth",W.ToString());
writer->WriteAttributeString("ContainerHeight",H.ToString());
writer->WriteAttributeString("ContainerDepth",D.ToString());
writer->WriteStartElement("Boxes");
writer->WriteAttributeString("BoxWidth",x1.ToString());
writer->WriteAttributeString("BoxHeight",y1.ToString());
writer->WriteAttributeString("BoxDepth",z1.ToString());
writer->WriteEndElement();
writer->WriteEndElement();
writer->WriteEndElement();
writer->WriteEndDocument();

writer->Close();}}}

and I call my function in the main program like this printinstance(f, l, W, H, D);
AnswerRe: save xml...help please Pin
Mark Salsbery12-May-07 6:36
Mark Salsbery12-May-07 6:36 
QuestionMonitor open files on a share Pin
Vadim Tabakman12-May-07 4:55
Vadim Tabakman12-May-07 4:55 
AnswerRe: Monitor open files on a share Pin
Vadim Tabakman12-May-07 16:47
Vadim Tabakman12-May-07 16:47 
QuestionDOS/16M: [2] not a DOS/16M executable Pin
TooLeeDiN10-May-07 22:14
TooLeeDiN10-May-07 22:14 
AnswerRe: DOS/16M: [2] not a DOS/16M executable Pin
Christian Graus12-May-07 23:02
protectorChristian Graus12-May-07 23:02 
Questiondata structure in c++ Pin
faradgi10-May-07 19:57
faradgi10-May-07 19:57 
AnswerRe: data structure in c++ Pin
Mark Salsbery11-May-07 6:11
Mark Salsbery11-May-07 6:11 
QuestionShould the DebuggerDisplay attribute work in C++/CLI? Pin
Bill Below10-May-07 14:56
professionalBill Below10-May-07 14:56 
QuestionSeparating Model and View Pin
tcompter9-May-07 11:08
tcompter9-May-07 11:08 
GeneralRe: Separating Model and View Pin
led mike9-May-07 16:15
led mike9-May-07 16:15 
AnswerRe: Separating Model and View Pin
led mike9-May-07 16:11
led mike9-May-07 16:11 
QuestionI Urgently Need Help About Threading ! Pin
Nonreturn9-May-07 9:57
Nonreturn9-May-07 9:57 
AnswerRe: I Urgently Need Help About Threading ! Pin
led mike9-May-07 10:38
led mike9-May-07 10:38 
GeneralRe: I Urgently Need Help About Threading ! Pin
Nonreturn9-May-07 11:49
Nonreturn9-May-07 11:49 
QuestionAutomating Excel - populating a cell Pin
BuckBrown9-May-07 8:53
BuckBrown9-May-07 8:53 
AnswerRe: Automating Excel - populating a cell Pin
led mike9-May-07 9:37
led mike9-May-07 9:37 
GeneralRe: Automating Excel - populating a cell Pin
BuckBrown9-May-07 10:22
BuckBrown9-May-07 10:22 

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.