Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 975
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
(no matter what number I put in when running the executable, I always get '2'):
Question for C experts - how to fix the code below
(no matter what number I put in when I run the executable, I always get '2'):
To accept command line arguments, two special built-in arguments are used: argc and argv. The argc parameter contains the number of arguments on the command line and is an integer, always at least 1 because the first argument is assumed to be the program name. The argv parameter is a pointer to an array of string pointers. In this array, each element points to some command line argument. All command line arguments are string, so conversion of any numbers to a desired binary format must be provided in the program during development.
PS: From here
Two special built-in arguments are used to accept command line arguments: argc and argv. The argc parameter contains the number of arguments on the command line and is an integer, always at least 1 because the first argument is the program name. The argv parameter is a pointer to an array of string pointers. In this array, each element points to some command line argument. All command line arguments are string, so any conversion to binary must be planned into the program during development.
PS: from here
Not sure about the names of the arguments (in the sense that there could be others), but that's really the idea.
This is a question related to C programming, but in this case of a general nature.
The program needs to run for say 500 hours, after which it should stop running automatically.
How to do the check correctly so that it loads the processor as little as possible?
As far as I remember, we need a loop (while/for) inside which the current time will be checked and then compared to the time of termination. When it is reached, the work will stop. Is this correct or am I missing something?
I have a question related to C programming, but in this case it's general in nature.
The program needs to run for say 500 hours, after which its execution should stop automatically.
How to carry out the check correctly so that to load the processor as less as possible?
As far as I remember, we need a loop (while/for) inside which the current time will be checked and then compared to the time of termination. When it is reached, the work will stop. Is this correct or am I missing something?
WinAPI has a timer https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms644906%28v=vs.85%29.aspx
Usageexamples.
WinAPI has a timer https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms644906%28v=vs.85%29.aspx.
Examples of use.
Please help translate the algorithm for finding the coordinates of the intersection point of two segments
From the article:
It's very simple!
x1,y1 and x2,y2 are coordinates of vertices of the first segment;
x3,y3 and x4,y4 are coordinates of the vertices of the second segment;
to find the intersection we make the equations of the lines:
first equation:
(x-x1)/(x2-x1)=(y-y1)/(y2-y1);
second equation
(x-x3)/(x4-x3)=(y-y3)/(y4-y3);
these equations define a line passing through two points, which is what we need.
From these equations we find x and y by the following formulas:
x:=((x1*y2-x2*y1)*(x4-x3)-(x3*y4-x4*y3)*(x2-x1))/((y1-y2)*(x4-x3)-(y3-y4)*(x2-x1));
y:=((y3-y4)*x-(x3*y4-x4*y3))/(x4-x3);
since our lines intersect, they have a common intersection point with the coordinates (x,y), which we need to find.
For the intersection to belong to our line segments, we need to constrain it, i.e. check the condition:
if
(((x1<=x)and(x2>=x)and(x3<=x)and(x4 >=x))or((y1<=y)and(y2>=y)and(y3<=y) and(y4>=y))
then there is an intersection point of these segments, and if there is not, there is no intersection point.
You should also check the parallelism of these segments using angle coefficients:
k1:=(x2-x1)/(y2-y1);
k2:=(x4-x3)/(y4-y3);
where k1 and k2 are the tangents of the angle of inclination of segments to the positive direction of axis ОХ, if k1=k2, then the segments are parallel, so they have no points of intersection.
Or maybe someone has a ready-made one in the archives?
Greetings
Does MT4 have a feature or function) Send internal terminal mail to or sms, (e.g. to receive server restarts, etc.)?
Doesn't anyone know about this?
And your mother does not allow to read the documentation? For example SendMail
Yes this function of course I know, I mean - a tab in the window of the terminal, (trade, assets, account history, news, alerts, mail, etc.) when mail comes there (in the internal mail terminal) sent SMS or e-mail (eg to receive messages about server reboot, etc.)?