Advertisement
SrJefers_Loading

mostrar

Mar 7th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. listView1->Items->Clear();
  2. FILE* fe;
  3. char* mos = "Datos.txt";
  4. char all[100];
  5. char *dato1, *dato2, *dato3, *dato4, *dato5;
  6. fe = fopen(mos, "r");
  7. rewind(fe);
  8. while (feof(fe) == 0)
  9. {
  10. fgets(all, 100, fe);
  11. dato1 = strtok(all, ";");
  12. dato2 = strtok(NULL, ";");
  13. dato3 = strtok(NULL, ";");
  14. dato4 = strtok(NULL, ";");
  15. dato5 = strtok(NULL, ";");
  16. String^ da1 = gcnew String(dato1);
  17. String^ da2 = gcnew String(dato2);
  18. String^ da3 = gcnew String(dato3);
  19. String^ da4 = gcnew String(dato4);
  20. String^ da5 = gcnew String(dato5);
  21. listView1->Items->Add(da1);
  22. listView1->Items->Add(da2);
  23. listView1->Items->Add(da3);
  24. listView1->Items->Add(da4);
  25. listView1->Items->Add(da5);
  26. }
  27. fclose(fe);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement