Untitled thread

Hi all Part of an interface definition in c++ is as follows: interface Account { struct Transaction { enum ttype {deposit, withdraw} direction; unsigned long amount; }; typedef sequence<Transaction> Statement;.

Windows Security 292 This topic was started by ,


data/avatar/default/avatar23.webp

13 Posts
Location -
Joined 2006-03-13
Hi all
 
Part of an interface definition in c++ is as follows:
 
interface Account {
struct Transaction {
enum ttype {deposit, withdraw} direction;
unsigned long amount;
};
 
typedef sequence<Transaction> Statement;
.....
.....
void deposit (in unsigned long amount);
.....
.....
 
}; //interface
 
 
void Account_impl::deposit( CORBA::ULong amount )
throw(
::CORBA::SystemException)
{
bal += amount;
 
std::map<std::string, Account::Transaction> trans_details;
trans.amount = amount;
trans.direction = deposit; (<<----)
trans_details.insert( std::pair<std::string,Account::Transaction>("Deposit",trans) );
 
}
 
When running the function deposit, I need to keep a track of all the transactions.
<trans> and <trans_details> already defined elsewhere.
Now I am getting error message on line (<<---) above - "Cannot resolve overloaded function based on conversion to type Account:Transaction:ttype".
How can I keep alog of t he transaction taking place in Function deposit().
Thanks
 
 
 
 
 
 

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.