CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Scrivere array in un file

    Ciao a tutti,
    avrei la necessit* di utilizzare 2 array e farmi creare un file con il contenuto del secondo array (contenuto che è pari al primo rimuovendo dal primo 1 riga).

    Io avrei fatto così (ma non funziona) :



    for(int i=0; i<=size; i++) {
    lista1->CopyTo(lista2, i+1);
    //lista1.CopyTo(lista2, i+1);
    StreamWriter ^ sw = gcnew System::IO::StreamWriter("dataset ["+ z +"].training");
    sw->WriteLine(lista2->ToString());
    sw->Close();
    z++;
    }

    Lista1 e Lista2 sono due array... il problema è che non so come dichiararli (mi d* un errore sul tipo).
    Non è una cosa del tipo: Array::CreateInstance(Type, size); ??
    Potete aiutarmi ?

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Scrivere array in un file

    Actually it would do much better for you (or faster maybe) if you report you problem in English. Again, C Sharp forum looks like the one you need but not C++.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured