It looks ok to me. On what line did you get the error?
>
> Luigi and Mike, thank you very much for the prompt reply. I tried the
> following but get a compile error "Cannot instantiate abstract class
> QuantLib::CashFlow".
>
>
> std::vector<boost::shared_ptr<CashFlow>> tempCashFlows;
> tempCashFlows=FixedRateBonds[i].cashflows(); //FixedRateBonds
> is a vector<FixedRateBond>
> std::vector<boost::shared_ptr<CashFlow>>::iterator it2;
> for(it2=tempCashFlows.begin();it2!=tempCashFlows.end();++it)
> {
> cout<< (*it2)->date();
> }
>
> What am I doing wrong here?
>
> Many thanks for your help
> Theo
>
>
> |------------>
> | From: |
> |------------>
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |Luigi Ballabio <
[hidden email]> |
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | To: |
> |------------>
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |Mike DelMedico <
[hidden email]> |
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Cc: |
> |------------>
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |QuantLib QuantLib <
[hidden email]> |
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Date: |
> |------------>
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |01/04/2013 20:44 |
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Subject: |
> |------------>
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |Re: [Quantlib-users] Bond Cash flow dates |
> >--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>
>
> The BondFlowAnalysis function is only available in QuantLibXL.
>
> In C++, call cashflows() to get a vector of pointers to CashFlow; then
> loop over the cashflows and call the date() method on each one.
>
> Luigi
>
>
> On Mon, Apr 1, 2013 at 8:26 PM, Mike DelMedico <
[hidden email]>
> wrote:
>> try BondFlowAnalysis, the left most vector is the one you want i think...
>>
>>
>> On Mon, Apr 1, 2013 at 1:12 PM, Theologis Chapsalis
> <
[hidden email]>
>> wrote:
>>>
>>> Deal QL community
>>>
>>> I am building a FixedRateBond object and want to get in one Vector<Date>
>>> all the dates of coupon payments for a bond. First I tried the function
>>> const Leg & cashflows ( ) const but that did not help. Then I used
> the
>>> nextCashFlowDate which is pretty good. However could I get ALL the
> future
>>> cash flow dates in one go?
>>>
>>> Thanks a lot
>>> Theo
>>>
>>>
>>>
>>>
> ------------------------------------------------------------------------------
>
>>> Own the Future-Intel® Level Up Game Demo Contest 2013
>>> Rise to greatness in Intel's independent game demo contest.
>>> Compete for recognition, cash, and the chance to get your game
>>> on Steam. $5K grand prize plus 10 genre and skill prizes.
>>> Submit your demo by 6/6/13.
http://p.sf.net/sfu/intel_levelupd2d>>> _______________________________________________
>>> QuantLib-users mailing list
>>>
[hidden email]
>>>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>>>
>>
>>
>>
> ------------------------------------------------------------------------------
>
>> Own the Future-Intel® Level Up Game Demo Contest 2013
>> Rise to greatness in Intel's independent game demo contest.
>> Compete for recognition, cash, and the chance to get your game
>> on Steam. $5K grand prize plus 10 genre and skill prizes.
>> Submit your demo by 6/6/13.
http://p.sf.net/sfu/intel_levelupd2d>> _______________________________________________
>> QuantLib-users mailing list
>>
[hidden email]
>>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>>
>
> ------------------------------------------------------------------------------
>
> Own the Future-Intel® Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13.
http://p.sf.net/sfu/intel_levelupd2d> _______________________________________________
> QuantLib-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>
>
>
>
> ************************************************************
> HSBC Bank plc
> Registered Office: 8 Canada Square, London E14 5HQ
> Registered in England - Number 14259
> Authorised and regulated by the Financial Services Authority
> ************************************************************
>
> -----------------------------------------
> SAVE PAPER - THINK BEFORE YOU PRINT!
>
> This transmission has been issued by a member of the HSBC Group
> "HSBC" for the information of the addressee only and should not be
> reproduced and/or distributed to any other person. Each page
> attached hereto must be read in conjunction with any disclaimer
> which forms part of it. Unless otherwise stated, this transmission
> is neither an offer nor the solicitation of an offer to sell or
> purchase any investment. Its contents are based on information
> obtained from sources believed to be reliable but HSBC makes no
> representation and accepts no responsibility or liability as to its
> completeness or accuracy.
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13.