Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int nacitanitypu()
- {
- cout << "Z ktereho souboru chcete nacitat typy ukolu ? (doporuceno: typy.csv ?) " << endl;
- char typy[30];
- info infa[500];
- cin >> typy;
- ifstream soubor(typy,ios::in);
- if (soubor.is_open())
- { cout << "Cteni typu ukolu probehlo usmesne." << endl << endl;
- while (!soubor.eof())
- {
- soubor >> radek;
- pocet_typu++;
- substring = strtok (radek,";");
- strcpy(infa[pocet_typu].jmeno,substring);
- strcpy(infa[pocet_typu].zacatek,substring);
- strcpy(infa[pocet_typu].konec,substring);
- while (substring != NULL)
- {
- substring = strtok (NULL, ";");
- cout << "jmeno ukolu " << pocet_typu << " je: " << infa[pocet_typu].jmeno << endl;
- }
- }
- }
- else
- {
- cout << "Zadany soubor neexistuje." << endl;
- } return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement