View Single Post
Old 04-10-2003, 08:58 AM   #2 (permalink)
saline
I am red.
 
saline's Avatar
 
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
saline is on a distinguished road
This post seems somehow... unfinished. You started to say something more and then it cut you off for some reason. Eitherway I've got an idea, sort of.

My experience has been when it says "cannot convert from a to b" it's a casting error of some kind. You're trying to reconcile two different kinds of data (like an int and a string) and the compiler has no idea what to do.

I don't know how likely that is in this case just becuse you're accessing functions and not assigning anything.

Because of this I might be concerned with the following, when you set the pointer to point to deposit for the first part of the array it may try and change to withdrawl when you set the second part of the array. Modifying the pointer within the declaration may mess with the declaration in a bad way.

Are all of the functions you listed (deposit, withdrawl and showall) in the same class either derived or base?

Also just to clarify you're trying to make an array of pointers to different functions so you can possible do something like the following:

Code:
transaction[0](100) // deposits 100 dollars into an account.
I have to get some lunch so maybe I'll explain a little more what I'm trying to say later.

good luck
__________________
http://home.cwru.edu/~cak19

It's my homepage with odd little bits of javascript.
saline is offline   Reply With Quote