Through trial and error I think I may have solved this.
void (CMyClass::*f[1])(int32, int32) = {&CMyClass::MyFunction1}
If this is glaringly wrong, please post a reply.
Thanks
Type: Posts; User: mlupo
Through trial and error I think I may have solved this.
void (CMyClass::*f[1])(int32, int32) = {&CMyClass::MyFunction1}
If this is glaringly wrong, please post a reply.
Thanks
I have a class member for which I'm trying to create a function pointer that will be stored in an array [of function pointers].
Given this example:
void CMyClass::MyFunction1(int32 param1,...
Thanks cpjust. I may do just that despite having been discouraged from this approach by our architects. I'm being "encouraged" to use function pointers instead.
FYI: As a test engineer who knows...
Salem,
It's all embedded code. I'm not all that certain I understand what you mean by "exec" the browser. I suspect you are suggesting that I start the browser from the C code. I cannot do that. ...
The C program is a server that is resident on a device. It's static and starts up when the device does. The C++ application is the open source OSS browser. It gets loaded dynamically in the device at...
I read the post:
http://cboard.cprogramming.com/cplusplus-programming/105247-combining-c-cplusplus-code.html
This shows how to call from C++ to C, but it didn't discuss how to call from C to C++...
yeah, I agree. But this is a production system that I'm making a change to and I'm kind of (ok VERY) rusty with my C.
What does the LOCAL keyword do in the following function? I am assuming it makes the function "foo" only available to other functions inside the same c file, but just looking for someone to confirm...
Which function in C helps me to determine what the disk format of the drive is that I am going to r+w a file on?
I need to determine whether it's NTFS or FAT32, etc.
Thanks,
Mike
This is even faster. And clever too!
It does not actually write to the file. It only creates/opens a file then seeks out to the end of it, then closes. I actually write "end" as the last 3 bytes but...
I've modified this to some extent.
What I am hoping to do is to double the size of the file each time through the loop.
The file is increasing in size but not exponentially as I thought that it...
:) Thanks. This gets me started in the right direction. Add some conditionals and off I go.
I need to write a small exe applet to fill a hard disk for testing purposes.
Does anyone have anything that does this already?
OR some suggestions how I might accomplish this with just a few...
I'm reading and trying to work through some problems in my book in preparation for up and coming Data Structures finals. I came across this question in my book and I'm sorta scratching my head on it....
>> fflush(sdin);
>And how many posts have you read which tell you this is a bad >idea?
Thanks Salem. I've never read any posts stating that fflush(stdin) was a bad idea. but I know now.
Mike
Hi,
So let me extend the question a little...
does it make sense to factor out any of the redundancy?
essentially, the a's could cancel out to this...
(b+c)-((c+b)/d)
Would this be an ok...
For translation of "a b c + * a / c b + d / - " to infix I get:
a*b+c/a-c+b/d
But to translate "a b c + * a / c b + d / - " into prefix I am certainly not getting it.
can someone please help?
...
Thanks for the confirmation.
It's appreciated.
Mike
Was not specified.
This is a C data structure thing.
Would the proper representation of this be:
AND
/ \
/ \
< AND
/\ /\
I think I'll take a stab at this:
1) store "410 North" Ave as a string. the numbers are character representations. If the data is in a specific format always you could also give the 410 it's own...
So would that be
int array = malloc(sizeof(int)*7);
right?
Thanks,
Mike
I've been presented with the question...
"Convert the following list into a heap: 12 19 33 26 29 35 22"
I figure that this can be accomplished a few ways.
1) moved into memory that is...
I've worked for two days on this algorithm but I'm stumped.
It's not printing out what the instructor states.
Where am I going wrong?
Thanks in advance,
Mike
/*Arrange the following single...
Hey Stoned,
Also, I tested the algorithm in my driver. In the case where the the two nodes swapped are not end nodes, it essentially removed the nodes between P2 and P1.
where 3 = P2, 7=P1
1 2...