I have no idea what this function Print does, but bool type can take only two values: either true or false. So what else info are you trying to get from it?
My DLL does receives numeric number based on my bars on my chart, so when it counts over 2000 , I want my bool value change from 0 to 1 or from false to true.... bars always reads from mt4 functions " Bars " which I use to get bars counts value from mq4 pass it over to dll check the bar value, if bars are more then 2000 then change the return value....
My DLL does receives numeric number based on my bars on my chart, so when it counts over 2000 , I want my bool value change from 0 to 1 or from false to true.... bars always reads from mt4 functions " Bars " which I use to get bars counts value from mq4 pass it over to dll check the bar value, if bars are more then 2000 then change the return value.... Thank you so much for the reply !!
My DLL does receives numeric number based on my bars on my chart, so when it counts over 2000 , I want my bool value change from 0 to 1 or from false to true.... bars always reads from mt4 functions " Bars " which I use to get bars counts value from mq4 pass it over to dll check the bar value, if bars are more then 2000 then change the return value.... Thank you so much for the reply !!
First, use code tags when posting code. The code you posted is unformatted and practically unreadable.
Second, you didn't show us a complete program. Where does "bars" come from when you call the DLL function? It just pops up out of nowhere -- who knows where it comes from, what value it has, where it was declared, nothing. How are we to know if your function works if the argument you're passing to it is not known by anyone looking at your post?
Code:
#include <My_Lib.mqh>
#include <iostream>
using namespace std;
int main()
{
cout << StartRulls(1) << "\n" << StartRulls(2001) << "\n";
}
So what does this print? Note that there are no unknowns such as a mysterious "bars" variable. I called the function with known values to see what happens.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; February 10th, 2013 at 04:53 AM.
Bookmarks