Hey!
My code has a MAIN() function as in nearly all of C codes have. And also some functions I customized on my own. So it seems just like this;
Now I want to turn into a DLL file. This program gets a STRING with gets(); function from user, and gives you a DOUBLE value by passing through some algorhytims. So I will enter a STRING in a game editor (named gamemaker; supports DLL) and then It will send this string to my DLL code, and after this DLL code, it returns a double value to game editor.Code:void function(......){ ... } double function1(......){ ... return ..; } int Main(){ //All the main codes here ... //some function calls ... }
So questions are here;
1- Should I change the type of int MAIN() into DOUBLE or CHAR or something?
2- Should I remove MAIN() function and replace it with another function, for example function3? ( I mean, there will be no Main() function in my codes, only usual functions that I created)
3- If MAIN() function is OK, when I try to return a double value in MAIN, it gives me a warning, "possible loss of data; converting double to integer", that is, as main() function is an integer type, it cant return a double, but the time I try changing main() function into a "double main()", it doesn't accept.
4- Any suggestions
Thanks in advance, any helps appreciated so much. (Using Visual Studio 2010)