Vida Marcell Posted November 1, 2022 Posted November 1, 2022 I want to be short, so i have a project manager, it can create and open projects. When creating it creates an xml file with properties like name, date, ect.. But i have problems with opening, whenever i launch it, i want it to read all the projects from a txt file where in every line a path leads to their xml file, and i load it into a listbox. How do i detect that there are already text in a line? And if i want to delete a project from the manager (so also from the listbox) how do i know wich line should i delete? Quote
klepto2 Posted November 2, 2022 Posted November 2, 2022 #include "UltraAppKit.h" using namespace UltraAppKit; int main(int argc, const char* argv[]) { String s = LoadFile("projects.txt"); vector<String> sarr = s.Split("\n"); for (auto s : sarr) { Print(s); } return 0; } And for deleting: Just rewrite the whole project text file, just iterate all your listbox items and save the data. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI
Vida Marcell Posted November 2, 2022 Author Posted November 2, 2022 I dont remeber having loadfile function, but this is helpful. Thanks!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.