Re: small program that generates terms in OEIS sequence A016278

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>----- Original Message ----
>From: Michael Schwendt <mschwendt.tmp0701.nospam@xxxxxxxx>
>To: fedora-test-list@xxxxxxxxxx
>Sent: Tuesday, April 22, 2008 8:28:50 AM
>Subject: Re: small program that generates terms in OEIS sequence A016278
>
>On Tue, 22 Apr 2008 05:44:39 -0700 (PDT), Antonio Olivares wrote:
>
>> If I use ios::endl, the program fails, 
>
>Oh yes, manipulators need the <iomanip> header. Sorry. ;)
>
>-- 
>fedora-test-list mailing list
>fedora-test-list@xxxxxxxxxx
>To unsubscribe: 
>https://www.redhat.com/mailman/listinfo/fedora-test-list

>

Even with the iomanip header file, compiler returns error

[olivares@localhost Documents]$ cat prog2.cpp
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <iomanip>
using namespace std;

int main(int argc, char *argv[])
{
for (int i=1; i < 7; i++)
{
  double j;
      j =
(4.0/7.0)*pow(2.0,i-1)+(-3.0/2.0)*pow(3.0,i-1)+(27.0/14.0)*pow(9.0,i-1);
  std::cout << i << ' ' << j << ios::endl;
}
return EXIT_SUCCESS;
}

[olivares@localhost Documents]$ c++ -o prog2 prog2.cpp 
prog2.cpp: In function ‘int main(int, char**)’:
prog2.cpp:14: error: ‘endl’ is not a member of ‘std::ios’
[olivares@localhost Documents]$

But I know that with endl; it works :)  Thanks for helping out with this issue.

Regards,

Antonio 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

-- 
fedora-test-list mailing list
fedora-test-list@xxxxxxxxxx
To unsubscribe: 
https://www.redhat.com/mailman/listinfo/fedora-test-list

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux