获取一个指向具有给定签名的函数的指针。
如何使用一个通用的函数的指针作为一个模板参数?
How to use a general function pointer as a template parameter?
当然,我可以通过一个指向函数的指针,但我想通过变量。
Of course I could pass a pointer to a function, but I'd like to pass variable.
这段代码将目标作为第一个参数,将一个代码函数的指针作为第二个参数进行传递。
The code passes the target as the first argument and a pointer to the code function as the second. The syntax for this is.
这时,如果我们发现函数的指针和函数处理的数据都位于同一个结构体中,我们就可以认为这个函数是一个类方法。
In such cases, the fact that both the function's pointer and the data it works with reside in the same data structure should be enough to convince us that we're dealing with a class.
在这里name是work_struct的名字,function是当任务被调度时调用的函数,data是指向那个函数的指针。
Where name is the work_struct name, function is the function to be invoked when the task is scheduled, and data is the pointer to that function.
指向要调用的回调函数的指针(对于一种或多种事件类型)——为每种特定的事件注册一个回调函数,然后将在事件发生时调用这些函数。
Pointer to the callback function to be invoked (for one or more event Types) — for each specific event, register a callback function, and then these functions are called when the event occurs.
但是,这个方法将所选函数的指针复制到一个局部变量中,然后用function对象的call方法调用这个函数。而不是直接调用它。
However, the method copies a pointer to the selected function into a local variable, and then calls the function with the call method of the function object, rather than calling it directly.
然后,您可以将库装入到您的地址空间中并使用函数指针调用方法。
You could then load the library into your address space and call the methods using function Pointers.
全局变量不会被分配在寄存器上,修改全局变量需要通过指针或者调用函数的方式间接进行。
Global variables are never allocated to registers. Global variables can be changed by assigning them indirectly using a pointer, or by a function call.
重写随后执行的函数指针或异常处理程序。
Overwriting a function pointer or exception handler that is subsequently executed.
其对象指针作为函数的第一个参数被传递。
The object pointer is passed as the first argument to the function.
返回指向静态数据的指针可能会导致函数不可重入。
Returning a pointer to static data may cause a function to be non-reentrant.
它对存储局部变量的位置进行重新排序,并复制函数参数中的指针,以便它们也在任何数组之前。
It reorders where local variables are stored, and copies Pointers in function arguments, so that they're also before any arrays.
调用的函数一定不能顾虑栈指针当前所指的位置。
The calling function must not care where the stack pointer is currently pointing.
通过使用引用,可以告诉函数指向信息的指针。
By using a reference, you tell the function to point to the information.
清单2提供了一个使用指针参数的稍微复杂的函数。
Listing 2 provides a slightly more complicated function that USES pointer arguments.
第二个域是这个函数使用的toc指针。
因此,使用简化ABI 的函数实际上可以通过从堆栈指针开始的负偏移量来保存、使用和恢复非易失性寄存器。
Therefore, functions using the simplified ABI actually can save, use, and restore non-volatile registers by using negative offsets from the stack pointer.
当完成该函数之后,使用返回指针回到原来的位置并继续程序。
After the function has been completed, the return pointer is used to go back to the original location and the program can continue.
使用 BOOST_TEST_CASE宏创建的单元测试以函数指针作为输入参数。
The unit tests that are created using the BOOST_TEST_CASE macros accept function pointers as their input arguments.
指向被映射函数入口点的指针。
你要将两个参数传递给此函数:服务名和指向ControlHandlerfunction的指针。
You will pass two arguments to this function: the service name and the pointer to the ControlHandlerfunction.
通过调用 DL_Dxf对象的in函数并将指针传递给一个继承 DL_CreationAdapter抽象类来打开此文件。
You open the file by calling the in function of the DL_Dxf object and passing a pointer to a class that inherits from the DL_CreationAdapter abstract class.
CSimpleBinaryTree提供了一个通用的全局比较函数,它可以比较两个长整型的指针。
CSimpleBinaryTree provides a generic global compare function that compares two Pointers of type long.
对于为W3C和Microsoft事件模型定义的匿名函数,都可以将FadingTooltip对象的指针封闭在其中。
You could have enclosed a pointer to your FadingTooltip object in the anonymous functions you defined for the W3C and Microsoft event models as well.
在pseudo中,为dlsym (RTLD_NEXT,“open ”)返回的地址储存在名为real_open的函数指针中。
In pseudo, the address returned for dlsym (RTLD_NEXT, "open") is stored in a function pointer named real_open .
在pseudo中,为dlsym (RTLD_NEXT,“open ”)返回的地址储存在名为real_open的函数指针中。
In pseudo, the address returned for dlsym (RTLD_NEXT, "open") is stored in a function pointer named real_open .
应用推荐