My problem is that the exact text will not be known at compile time. The text will be gleaned from a file once the program is running and is subject to change. I will not even know how many functions...
Type: Posts; User: nectodn
My problem is that the exact text will not be known at compile time. The text will be gleaned from a file once the program is running and is subject to change. I will not even know how many functions...
Unfortuanatly function objects wouldn't work as the program I'm plugin into won't accept them (it crashes). Maybe I should try to explain with some example code.
Example of my code
void...
Hi I have a problem with a plugin I am making. The program I am plugin into only allows me to use functions with no arguments, but I want to use the same function for an unknown(at compile time)...
You were right! I was accidently adding the structures on the end of files1 instead of file2. Opps! I'll remember to read my code more throughly before posting next time:)
I have a vector of structures which contain filenames of type std::string. When I use std::cout to output these strings like so:
for (iter=files1.begin(); iter != files1.end(); iter++)
...
Ahh. That was my mistake, it wasn't supposed to be a memory address. Not very good with pointers.
Though if it was always pointing at a memory address how come the program consistently gave me...
My mistake again! I had just forgotten to put the '&' in.
Still doesn't explain my strange results in my original program.
sorry, shoud be:
0 = @
1 = A
NULL
Doing what you suggest crashes my programming, not sure why. And I also can't work out why my program out puts:
0 = A
1 = B
I was expecting:
0 = H
1 = I
NULL
Can anyone tell me what is going on in this code:
int main()
{
unsigned short shortint = 0x4041;
unsigned char *output = (unsigned char *) shortint + NULL;
for (int i=0; i<26;...
I was wondering if it is possible to dynamically call a function at run-time without the program knowing what the function is or how many arguments or what type thae args are.
(E.g.
func (args);
)