1、BOOL is Microsoft's macro . In fact, is only 4 bytes of int type. This definitions ,you can find it in the VC setup directory (WINDEF.h、AFX.H), It can be found this following code:
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
// AFX.H#define FALSE 0
#define TRUE 1
#define NULL 0
bool is C/C + + keywords, about MSDN2005 help document, explained below:
This keyword is a built-in type. A variable of this type can have values true and false. Conditional expressions have the type bool and so have values of type bool. For example, i!=0 now has true or false depending on the value of i.
The values true and false have the following relationship:
When a postfix or prefix ++ operator is applied to a variable of type bool, the variable is set to true. The postfix or prefix -- operator cannot be applied to a variable of this type.
The bool type participates in integral promotions. An r-value of type bool can be converted to an r-value of type int, with false becoming zero and true becoming one. As a distinct type, bool participates in overload resolution.
2、Define BOOL and bool of the reasons.
In the memory space,the true、false、null is occupying 1 bytes.But TRUE、FALSE、NULL is occupying 4 bytes.
According to the Intel CPU's paging memory mechanism, 4 bytes can prevent memory inattentive,
it can prevent to produce more ram pieces,and help the data transmission.
error C2664: 'time' : cannot convert parameter 1 from 'float ** ' to 'float (*)'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\msw_give_out\msw_shotplus_i_format\class.cpp(2144) : error C2511: 'time' : overloaded member function 'void (float (*))
' not found in 'class'
c:\msw_give_out\msw_shotplus_i_format\class.h(16) : see declaration of 'class'
Error executing cl.exe.
As has already been suggested, please spend some time (here, for example) knowing the differences/similarities between arrays and pointers when using functions. Without that knowledge, you are going to continue to face the same struggles.
That said, have you tried:
void CCvib_procDlg::time(float**, int dim1, int dim2);
time(delms, 1000, 6);
I would refrain from naming a function time() as it could be confused with the time() function.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
I am beginner in C++ and have problem with one my program.
I am C++ dll for protection my Expert advisor(Metatrader software).
I want make demo version for my client and want using time limit on that.
For example each client able use this software for 7 days and after that not workable for him/her.
I want simple code that check this time for me.
I am using win32 console.
1- Don't waste time on that. If your program is worthy enough, then it WILL be cracked/hacked whatever you do and you will loose a lot of valuable time working on "security" instead on the core business of your application.
2- Release a version of your software with a limited set of function and features with code REMOVED from the executable. (for example no save/export/report, limit the number of trade per day/hours, ...)
Which window handle? There are usually more windows belonging to a process (e.g. controls on a dialog like buttons, edit fields have a window handle too). Anyways, i assume you are looking for a top level popup window, one method would be to enumerate all the windows, for example using EnumWindows[^], on every window you could call GetWindowThreadProcessId[^] to get the id of the process the window belongs to and test for equality...
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <
The handle of what window?
To retrieve all windows of a process, you have to call EnumWindows and, for each window, use GetWindowThreadProcessId to check if a window belongs to a process (the ProcessID of the window equals the ProcessID of the process).
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 8:59