Hi,
In the example below, the reference to document.form1.vcol.value works in the pick function but error says not defined in the crand function. Using IE 7.
Rick
<html>
<Script type="text/javascript">
<!--
function crand () {
var rnum = Math.random();
var rc;
if (rnum < 0.5)
{rc =...
Hi,
How would I use the code that cpjust shows in the previous reply? I would like an example.
cpjust writes...
This way you can just call GetFunc() to get the raw function pointer and do whatever you want with it, and you won't need to write hundreds of functor classes.
Thanks,
Rick.
Hi,
The functions are within the program, not system ones like printf. The array of function pointers would have void return types, parameters would be either void to 1-5 class objects or structs, it could be objects if that's easier. The function pointer would be passed to the execute_fn...
Hi,
The array of pointers to functions would be be a library of functions that would be called using a execute command. So there would be a add_fn to add functions to a list and a execute_fn, the args are popped from the stack. The stack is an object containing the args. Since you can overload...
Hi,
How would define an array of function pointers where the return type or arguments are different? For example,
int (*fn)()
void (*fn)(int)
char (*fn)(int, char)
This would be for building a dictionary of function calls.
Older C languages didn't strong typing so you could use int (*fn)() for...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.