Actually, there is only 1 version of main(). There can only be 1 version of main(). You have declared 2 versions of Main(). Big difference. That's why I suggested you rename Main to something else.
Next, you state that main() is defined in a header file. NO!!! main() should be defined in a source file (.cpp). Never define functions in header files (unless they are inline).
You never defined void Main(vector<string> argumentlist={0}, bool IsOpened=false); (at least I don't see the definition).
Your main() function never calls the Main(/* no arguments*/) function.
So, after you clean up your default argument mess to get rid of the ambiguity, you have 2 Main functions declared, 1 of which is defined, and the other is called.
1) Think about the question that I added to my last post, that you may not have seen.
2) Decide what you want Main() to do, that's differently from Main(foo, bar).
3) Write the definition for Main()
4) Remove the default value from at least one of the arguments to Main(foo, bar).
How is this not already clear from what @coder777 and I have been saying?
i can do these with original main(): int main()
or int main(int argc, char **argv)
is what i'm trying to do with my Main() and call what was defined.
if i'm thinking to much about the C\C++, please tell me
Why do you need to test whether they're defined? It's your code. If you define the functions, then they're defined, so write code that calls them. If you don't define them, they're not defined, so don't write code that calls them.
Whatever your problem is, you need to give us a much, much better description of what it is you're trying to do, and why.
i'm continuing creating my own compiler.. with some success.
my compiler do:
1 - test some characters if they are valid;
2 - collect the tokens(words\symbols and operators;
3 - test if is a variable creation, expression...
4 - test if theres any errors;
5 - convert the code to C\C++.
why i'm using my Main() instead the original main()!?! because it's better have the parameters from a vector and tell me if the program is executed.
why having 2 Main() signatures!?! maybe for be more easy to use and start. but i can change 1 thing: on my program i can give automatic the Main() function for be much more easy. and use only the parameters signature
on these topic i have learned so much.
thank you so much to all