On Friday, 28 February 2014 at 16:26:17 UTC, Dicebot wrote:
On Friday, 28 February 2014 at 16:16:36 UTC, Suliman wrote:
Thanks! I know about static, but now I need experience to work with class constructor. So now I can't understand what I can do with error: "Error: need 'this' for 'isConfigExist' of type 'bool()'"

Most likely you don't create an instance. This works:

http://dpaste.dzfl.pl/7c6ada9056ea

Big thanks! That's work!

What is the way to get from function 2 return value? For example I need get true or false and string value (to use it in another function).

        bool isConfigExist()

                {
                        configpath = exePath() ~ "config.txt";
                        if (exists(configpath))
                                {
                                return true;    
                                }
                                
                        else
                        return false;

                }

Now function return only bool and I need to make it's universal to get text also

Reply via email to