Untitled thread

This is a discussion about Untitled thread in the Windows Security category; 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 in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Aug 3
Created
Aug 3
Last Response
0
Likes
1 minute
Read Time
User
Users