Originally Posted By: lemming
So you now have like 8 or 10 functions to read text files to strings? 4 where already in your snippet where you read them to local strings, 1 or 2 you mentioned to read the global variables in a list (I still don't understand why you just don't skip that step) and another 3 for fixing reading the files? Well, at least it works.
well no, I have 8 functions for the whole thing (updating panels size
/pos, reading titles and creating buttons, adding new documents, reading data and panel events) and only one of them runs in the main game loop, all others run once where they needed. And I don't see any problems here wink plus don't take the example which was posted above to serious, its just an example to show the problem (which has only ONE function that reads data from file, one handles loading process and two others could be even deleted particularly in this example, but I see no reason to care about them either).

Originally Posted By: lemming
You are not very clear here. Strings (plural intended?) are returned to what? Returned as return value? And you don't need to delete the string pointers as they are on the stack and get deleted when the function ends, but the strings they are pointing to. But I guess you or something meant that.
well by saying that they (strings) are returned, I mean that THEY are returned (return(string name)), you are making thing too complicated grin if I would return a value, I would say that they do return a value.. but anyway do I need to remove this string pointers (STRING*) which are created locally in the functions body?

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung