Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

C++ Help! Please!

Name: Amna Umen 2008-04-02 18:37

Ok so i'm working on my project that integrates using the simpson method. I have the code for the first part done, but now i'm getting this bullshit "multiple declaration for 'fout'"

What the hell does that mean?! I only have the ofstream fout up at the top. Any help would be appreciated here, or if someone has a working code for this. I'm dying over this. Here's the code.

#include <conio.h>
#include <fstream.h>
#include <iomanip.h>
#include <iostream.h>
#include <math.h>

ofstream fout;

int main ()
  {
    // Variable Declarations
    char input;
    int equa, i, j, k, u;
    double a, b, coef[10], fa, fb, fx, r, delta, told, x, tnew, snew, uplim;

    // Alphabetized Variable Dictionary
    //==========================================================================
    // a: Used in equation
    // b: Used in equation
    // coef[10]: Where the coefficient is stored
    // equa: Number of equations
    // fa: Stores the value of fa
    // fb: Stores the value of fb
    // fx: Degree of accuracy
    // i:  Centering aid
    // reply: Used to store yes or no inputs
    // j:  used in the input of coefficients
    // k:  Iteration counter
    // r: The root of the polynomaial
    // u:  The highest power of x
    //==========================================================================

    fout.open ("integral.txt");

    cout << fixed << setprecision (4);
    fout << fixed << setprecision (4);

    // Program Start
    for ( i = 1; i <= 8; i++ )
      {
        cout << endl;
      }

    cout << setw (50) << "Integral Solver";

    cout << endl << endl << endl;

    cout << setw (57) << "Solves the Integral Using Simpsons Method";

    cout << endl << endl << endl;

    cout << setw (50) << "Strike Enter to start";

    cin.get ();

    equa = 0;
    k = 0;

     do
        {
          clrscr ();

          for ( i = 1; i <= 12; i++ )
            {
              cout << endl;
            }

          // Prompts user for Highest Power of polynomial
          cout << setw (61) << "Input the polynomial's highest power: ";
          cin >> u;
          clrscr ();

          // Prompt user for coefficients
          for ( j = u; j >= 0; j-- )
            {
              for ( i = 1; i <= 12; i++ )
                {
                  cout << endl;
                }

              cout << setw (53) << "Input the Coefficent of x^" << j << ": ";
              cin >> coef[j];
              clrscr ();
            }

          // Prompts user for bounds
          cout << setw (61) << "Input the integrals upper bound";
          cin >> b;

          cout << setw (53) << "Input the integrals lower bound";
          cin >> a;
          clrscr ();

          do
            {
              clrscr ();

              // Prompts user if the equation is correct
              for ( i = 1; i <= 7; i++ )
                {
                  cout << endl;
                }

              cout << setw (42) << "Function #" << equa << ": ";

              cout << endl << endl << endl ;


              switch (u)
               {
                 case 9: ;
                 case 8: ;
                 case 7: cout << "f(x) = " ;
                   break;
                 case 6: cout << setw(8) << "f(x) = ";
                   break;
                 case 5: cout << setw(13) << "f(x) = ";
                   break;
                 case 4: cout << setw(18) << "f(x) = ";
                   break;
                 case 3: cout << setw(23) << "f(x) = ";
                   break;
                 case 2: cout << setw(28) << "f(x) = ";
                   break;
                 case 1: cout << setw(33) << "f(x) = ";
                   break;
                 case 0: cout << setw(38) << "f(x) = ";
               }

            for (j = u; j >= 1; j--)
            {
            cout << coef [j] <<  "x^" << u << " + ";
            }
              cout << coef[0] << "x^0";

              cout << endl << endl << endl;

              cout << setw (52) << "Is f(x) correct?  (y/n)? ";

              cin >> input;
            }

          while ((input != 'n') && (input != 'N') &&
                (input != 'y') && (input != 'Y'));
        }

      while ((input == 'n') || (input == 'N'));
      }
      fout << setw (43) << "Bisection Method" << endl << endl;
      fout << setw (40) << "Equation # " << equa << endl << endl;

      clrscr ();
      b = 0;
      fb = 0;
      // Evaluate fb using horner's method
      for ( i = u; i >= 0; i-- );
        {
          fb = fb * b + coef [i];
        }

      do
        {
          a = b;
          fa = fb;
          b = a + 1;
          fb = 0;

          for ( i = u; i >= 0; i-- )
            {
              fb = fb * b + coef [i];
            }
        }

      while (fa * fb >= 0);

      fout << setw (25) << "k" << setw (10) << "x" << setw (10);
      fout << "fx" << endl << endl;

//Begin calculations
        k = 0;
        delta = b - a;
        told = delta *(fa + fb) / 2;
        k = k + 1;
        delta = delta / 2;
        x = a + delta;
        tnew = told / 2 + delta * fx;
        snew = (4 * tnew - told) / 3;
        uplim = pow (2, k - 1);

        cout << uplim;

        cin.get();
      // Prompt user if there is another function
      do
        {
          clrscr ();

          for ( j = 1; j <= 12; j++ )
            {
              cout << endl;
            }

          cout << setw (58) << "Is there another function? (y/n)? ";


          cin >> input;
        }

        while ((input != 'n') && (input != 'N') &&
               (input != 'y') && (input != 'Y'));

        fout << "\f";


    fout.close();
    return 0;
    }













Name: Anonymous 2008-04-03 11:42

//==========================================================================
Parts of me died.

Name: Anonymous 2008-04-03 13:07

[a-z]out considered harmful

Name: RedCream 2008-04-04 12:39

// fa: Stores the value of fa
LOLLOL

Name: Anonymous 2008-04-05 8:52

hax my anus

Name: Anonymous 2008-04-05 15:37

Your compiler should give you a line number for the error.

If it's a linker error, just change the name of "fout" to something else.

Name: bob 2008-04-18 3:28

what the hell happened to functions?

Name: Anonymous 2008-04-18 15:26

>>7
Functions considered harmful.

Name: Anonymous 2008-04-21 4:05

Name: Anonymous 2008-07-14 5:59

wait, is /prog/ dead or something?  Or do we just shit out our posts anywhere now?

Name: Anonymous 2008-07-15 0:45

>>11
we try to keep things open so we can come ine here and talk about anime for example and that is fine

Name: Anonymous 2008-09-30 13:00

>>1
READ SICP

Name: Anonymous 2008-09-30 14:02

>>7
They use stack, which is a security risk.

Name: Anonymous 2008-09-30 15:45

what the hell happened to functions?
Sepples programmers don't use them because Sepples compilers are shit at optimization.

Name: Anonymous 2008-09-30 15:56

>>16
Please return to/prog/, Mr.Sussman.

Name: uurmt 2008-10-25 0:33

http://www.uurmt.jp/でございます。
ついに、http://www.uurmt.jp/営業開始いたします。
24時間注文可能。
ルーセントハートrmt   
報-交換-裏技-相場―アカウント販売-WIKI-クエスト-精錬
lucent heart ルーセントハート スター RMT 育成代行   夢世界 コイン RMT 育成代行
SUN ハイム RMT 育成代行 ROSE ロース ジュリー(July) RMT 育成代行 風林火山 両 RMT 育成代行  ECO エミルクロニクルオンライン ゴールド RMT 育成代行  PANDORASAGA    RMT   育成代行 ァラド戦記  RMT   育成代行 CABAL   RMT 育成代行 誅仙 RMT    育成代行 などいろいろなmmorpgもっと楽しみに~
なにが不明点があったら、サポートmsn:UUrmt@hotmail.co.jp或いはHPにライブチャートご利用してください。
攻略-通貨-販売-買取RMT-通貨-販売-買取-金販売-通貨販売-育成代行-価格-武器-攻略-情報-交換-裏技-相場―アカウント販売-WIKI-クエスト-精錬
UURMT.JPは来なければならない場所から来たくなる場所に変わるために努力しております
皆様、ぜひWWW.UURMT.JPにいらっしゃってください.7777
http://www.uurmt.jp/rmt販売-ルーセントハート-RMT-通貨販売-買取-攻略-育成代行.html
http://uurmt.blogspot.com/ 
  リアルマネートレード専門店(UURMTのゲームショップ)
  ホームページ:http://www.uurmt.jp/
  連絡メール:uurmt4u@yahoo.co.jp
  メッセンジャー:uurmt@hotmail.co.jp

Name: Anonymous 2008-11-08 18:36

http://www.uurmt.jp/でございます。
ついに、http://www.uurmt.jp/営業開始いたします。
24時間注文可能。
ルーセントハートrmt  
報-交換-裏技-相場―アカウント販売-WIKI-クエスト-精錬
lucent heart ルーセントハート スター RMT 育成代行   夢世界 コイン RMT 育成代行
SUN ハイム RMT 育成代行 ROSE ロース ジュリー(July) RMT 育成代行 風林火山 両 RMT 育成代行  ECO エミルクロニクルオンライン ゴールド RMT 育成代行  PANDORASAGA    RMT   育成代行 ァラド戦記  RMT   育成代行 CABAL   RMT 育成代行 誅仙 RMT    育成代行 などいろいろなmmorpgもっと楽しみに~
なにが不明点があったら、サポートmsn:UUrmt@hotmail.co.jp或いはHPにライブチャートご利用してください。
攻略-通貨-販売-買取RMT-通貨-販売-買取-金販売-通貨販売-育成代行-価格-武器-攻略-情報-交換-裏技-相場―アカウント販売-WIKI-クエスト-精錬
UURMT.JPは来なければならない場所から来たくなる場所に変わるために努力しております
皆様、ぜひWWW.UURMT.JPにいらっしゃってください.7777
http://www.uurmt.jp/rmt販売-ルーセントハート-RMT-通貨販売-買取-攻略-育成代行.html
http://uurmt.blogspot.com/ 
  リアルマネートレード専門店(UURMTのゲームショップ)

Name: Anonymous 2008-11-10 19:14

Name: 4yourtoon 2009-04-23 11:20

Name: Anonymous 2009-05-13 20:30

>>1
Back to /prog/, please.

Name: nicky 2009-08-28 3:53

Name: Anonymous 2009-09-18 13:04

Name: nike dunk sb 2009-10-21 12:47


Standard is very important to choose a thing.Different criteria lead to different results.
Choosing shoes is the same rationale.Beautiful and comfortable standard of the majority of people are basically.nike dunk sb shoe is consistent with this standard.Regardless of the external and internal design would use this unique technology.  http://www.dunksky.com/

Name: Franck Muller 2010-01-04 8:16

Name: Concord watches 2010-01-06 2:51

<A href="http://www.longineswatches.org/">replica watches</A><BR><A href="http://www.longineswatches.org/">cheap replica watches</A><BR><A href="http://www.longineswatches.org/">watches replica</A><BR><A href="http://www.longineswatches.org">cheap fake watches</A><BR><A href="http://www.longineswatches.org/">replica watch</A><BR><A href="http://www.longineswatches.org">watches for sale</A><BR><A href="http://www.longineswatches.org/Rolex/">Rolex watches</A><BR><A href="http://www.longineswatches.org/Hermes/">Hermes watches</A><BR><A href="http://www.longineswatches.org/Montblanc/">Montblanc watches</A><BR><A href="http://www.longineswatches.org/Panerai/">Panerai watch for sale</A><BR><A href="http://www.longineswatches.org/Hermes/">replica Hermes</A><BR><A href="http://www.longineswatches.org/Concord/">Concord watches</A><BR>

Name: replica Patek Philippe 2010-01-07 21:22

<A href="http://www.iwcwatches.us/">watches replica</A><BR><A href="http://www.iwcwatches.us/">replica watches</A><BR><A href="http://www.iwcwatches.us/">replica watch</A><BR><A href="http://www.iwcwatches.us">cheap fake watches</A><BR><A href="http://www.iwcwatches.us/Rolex/Day%20Date/">replica Rolex Day Date</A><BR><A href="http://www.iwcwatches.us/IWC/">IWC watch for sale</A><BR><A href="http://www.iwcwatches.us/Graham/">Graham watch for sale</A><BR><A href="http://www.iwcwatches.us/Jaquet-droz/">Jaquet droz replica</A><BR><A href="http://www.iwcwatches.us/Rado/">Rado watches</A><BR>

Name: meng 2010-03-12 21:06

<p><STRONG><a href="http://www.sweetv.com">GHD</a></STRONG><a href="http://www.sweetv.com"> Hair <STRONG>Straighteners</STRONG></a> &amp; CHI Flat Iron -   Shop Online For <STRONG><a href="http://www.sweetv.com">GHD</a></STRONG><a href="http://www.sweetv.com"> Stylers</a>,<STRONG>ghd</STRONG> factory direct   of the cheap <STRONG><a href="http://www.sweetv.com">ghd</a></STRONG><a href="http://www.sweetv.com/GHD-Purple-Gift-sweetv-195.html"> hair <STRONG>straighteners</STRONG></a><STRONG></STRONG> and <STRONG><a href="http://www.sweetv.com">ghd straighteners</a></STRONG>.<a title="GHD Styling Set" href="http://www.sweetv.com/GHD-Styling-Set-sweetv-204.html" alt="GHD Styling Set">GHD Styling Set</a>
      <a title="GHD Dark Styler" href="http://www.sweetv.com/GHD-Dark-Styler-sweetv-202.html" alt="GHD Dark Styler">GHD Dark Styler</a>
      <a title="GHD Gold Styler" href="http://www.sweetv.com/GHD-Gold-Styler-sweetv-201.html" alt="GHD Gold Styler">GHD Gold Styler</a>
      <a title="GHD Kiss Styler " href="http://www.sweetv.com/GHD-Kiss-Styler--sweetv-200.html" alt="GHD Kiss Styler ">GHD Kiss Styler </a>
      <a title="GHD Luxury Gift Set " href="http://www.sweetv.com/GHD-Luxury-Gift-Set--sweetv-199.html" alt="GHD Luxury Gift Set ">GHD Luxury Gift Set </a>
      <a title="GHD Pink Styler" href="http://www.sweetv.com/GHD-Pink-Styler-sweetv-198.html" alt="GHD Pink Styler">GHD Pink Styler</a></p>

Name: sn 2010-03-24 3:27

<a href="http://www.deai-saku.com/">サクラ出会い</a>
<a href="http://www.money-qa.net/">クレジットカード現金化</a>
<a href="http://www.deai-q.com/">出会い系</a>
<a href="http://www.card-genkinka.com/">クレジット現金化</a>
<a href="http://www.keiba-tekicyu.com/">競馬予想</a>
<a href="http://www.job-chatnavi.com/">チャットレディ</a>

Name: ロレックス時計 2010-03-25 17:51

<A href="http://www.brandsto.com">ブランドバッグ</A><BR><A href="http://www.brandsto.com">ブランド時計</A><BR><A href="http:// http://www.brandsto.com/shiji/Rolex/">ロレックス時計
</A><BR><A href="http://www.brandsto.com/CHANEL/">シャネルバッグ
</A><BR><A href="http://www.brandsto.com/HANDBAGS/hermes/">エルメスバッグ</A><BR><A href="http://www.brandsto.com/LOUIS_VUITTON/">ルイ・ヴィトン</A><BR><A href="http://www.brandsto.com">ロレックス コピー</A><BR>

<A href="http://www.brandsto.com">ブランドバッグ</A><BR><A href="http://www.brandsto.com">ブランド時計コピー</A><BR><A href="http:// http://www.brandsto.com/shiji/Rolex/"> ロレックス時計激安
</A><BR><A href="http://www.brandsto.com/CHANEL/">シャネルバッグ激安
</A><BR><A href="http://www.brandsto.com/HANDBAGS/hermes/">エルメスバッグ</A><BR><A href="http://www.brandsto.com/LOUIS_VUITTON/">ルイ・ヴィトン激安</A><BR><A href="http://www.brandsto.com">ロレックス コピー</A><BR>

 
     <a href="http://www.brandsto.com/shiji/Rolex">ロレックス時計</a>
    <a href="http://www.brandsto.com/shiji/Rolex/Rolex-Daytona"><font color="#000000">ロレックス デイトナ</font></a> 
     <a href="http://www.brandsto.com/shiji/Rolex-Explorer"><font color="#000000">ロレックス エクスプローラI、II</font></a> 
     <a href="http://www.brandsto.com/shiji/Rolex/Rolex-DateJust"><font color="#000000">ロレックス デイトジャスト</font></a> 
    <a href="http://www.brandsto.com/shiji/Rolex/Rolex-Milgauss"><font color="#000000">ロレックス ミルガウス</font></a> 
     <a href="http://www.brandsto.com/shiji/Rolex/Rolex-Submariner"><font color="#000000">ロレックス サブマリーナー</font></a>

Name: bill 2010-04-15 2:46

I bought some Discount MBT Shoes last summer and wore them for 3 months to work and for short walks. One day during the third month I noticed an ache in my right foot around my arch. By the end of the day I could barely walk. I went to a friend who is in school to be a foot doctor and she told me never to wear them again because they were reshaping my foot. I had to take 2 days off work because I was in that much pain and couldn’t stand and for a few weeks I wore tape around my foot for support. When I asked the salesman about this he was not helpful at all and said there was no way I could ever be refunded and the MBT shoes sale company would never hear me out unless I had a professional foot doctor look at my foot. I haven’t worn mbt walking shoes since and I didn’t think it would be worth my time or effort to try for a refund. My foot is okay now, but sometimes it still aches. Has anyone else had this experience?

Name: sunglassshopping 2010-04-16 1:38

Oakley Sunglasses are good choice for people. Ray Ban Sunglasses are of high quality. You will have a brand new experience when using Oakley Custom Sunglasses.  http://www.sunglasses-shopping.com/

Name: Mbt 2010-04-22 1:03

The <a href="http://www.mbt-antishoes.net">Mbt</a> Made from excellent quality raw material, <a  href="http://www.mbt-antishoes.net">Mbt shoes</a> makes several positive claims and benefits, The <a href="http://www.mbt-antishoes.net">Mbt sale</a> Now! Free Shipping! NO Tax!

Name: birkenstock 2010-06-08 3:23

Birkenstock is a German brand of sandals and other shoes, notable for their contoured cork and rubber footbeds which conform somewhat to the shape of their wearers' feet. Birkenstock shoes have deep heel cup to ensure proper weght distribution and foot alignment. You can wear Birkenstock sandals to everywhere you want to. Latest Birkenstocks are on nearly 50% discount in http://www.digdig-birkenstock.com . Free shipping worldwide!
http://www.digdig-birkenstock.com                   birkenstock shoes 
http://www.digdig-birkenstock.com                   birkenstock
http://www.digdig-birkenstock.com                   birkenstock sandals
http://www.digdig-birkenstock.com                   birkenstocks
http://www.digdig-birkenstock.com                   birkenstock gizeh

Name: cy7891LT 2010-06-10 23:36


A11-3


<a href=" http://www.coachbag.us/" title="coach outlet">coach outlet</a>American style
<a href=" http://www.coachbag.us/" title="coach bags">coach bags</a>In the past decade,
<a href=" http://www.coachbag.us/" title="coach handbags">coach handbags</a>the Coach Outlet has developed into a well-known brand in the United States,
 providing more male accessories including Coach Bags, small leather goods, Briefcase, travel goods, handbags, watches, outdoor apparel, scarves, sunglasses, jewellery and perfumes, etc. The product range of increase further established the brand's unique style

Name: rishad 2010-06-15 2:52

hey does anyone have a google voice account with any invite?

Name: fedvf 2010-10-10 2:49

Name: jersey4nfl.com 2010-11-28 5:52

NFL Jerseys   Cheap NFL Jerseys   Wholesale NFL Jerseys       Cheap Jerseys   Wholesale Jerseys    NFL Women’s Jerseys   NFL Hats   NFL Youth Jerseys  Reebok NFL  Replica NFL
http://www.jersey4nfl.com

Name: bags-shoes.com 2010-12-19 21:25

www.abercrombie-fitch.cc Abercrombie & Fitch Tees, A&F Tees T-shirt Women,A&F Classic Shirts Men,A&F Men Jeans,Abercrombie&Fitch Sweater,A&F Long sleeve POLOS,A&F Long Sleeve Tees Mens,A&F Men Outerwear,A&F Men Hoodies  ,A&F Wonen Hoodies www.abercrombie-fitch.cc

Name: AdobiCatnip 2010-12-20 8:16

you dont need an invite for google voice

Name: cheappradas 2010-12-22 21:53

http://www.cheap-prada.com/ Online Sale Wholesale:Prada Shoes,Cheap Prada Shoes,Cheap Pradas,Prada Shoes,High Top Prada Sneakers,Cheap Prada Handbags,Prada Sunglass Wholesale.

Name: ファンサイト 2011-01-13 0:46

ファンサイト
http://doll-link.biz/    倖田來未 
http://parl.doll-link.biz/ レディガガ
http://up.doll-link.biz/   上戸彩
http://red.zokuzoku.biz/  石原さとみ
http://up.zokuzoku.biz/   ビヨンセ
http://link-site.jp/    綾瀬はるか
http://good-seo.jp/ 木村カエラ
http://wheat.good-seo.jp/ 新垣結衣
http://yellowgreen.good-seo.jp/
http://lightpink.link-site.jp/ キヤノンEOSシリーズ
http://zexy4end.link-site.jp/ ニコンFシリーズ
http://cambodia.7access.net/ FCバルセロナ
http://uk.7access.net/ レアルマドリード

Name: arina 2011-01-13 2:13

Name: abercrombie-fitch.cc 2011-03-16 8:37

Abercrombie Fitch, Cheap Abercrombie&Fitch, Abercrombie&Fitch Jeans, Cheap Abercrombie&Fitch Jeans, Abercrombie&Fitch Polos, Abercrombie&Fitch Tees, Abercrombie&Fitch T Shirts, Cheap Abercrombie&Fitch T Shirts, Abercrombie&Fitch Clothing, Abercrombie&Fitch Jackets, Cheap Abercrombie&Fitch Jackets, Abercrombie&Fitch Coats, Abercrombie&Fitch Hoodies, Abercrombie&Fitch Pants, Abercrombie&Fitch Hoodies, Abercrombie&Fitch Skirt
If you need more information welcome visit to http://www.abercrombie-fitch.cc/

Name: afdsad 2011-03-20 20:32

Name: Anonymous 2011-03-23 15:03



         ∧_∧   / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
          ( ´∀`) < google motherfucker!
        /    |    \________
       /       .|     
       / "⌒ヽ |.イ |
   __ |   .ノ | || |__
  .    ノく__つ∪∪   \
   _((_________\
    ̄ ̄ヽつ ̄ ̄ ̄ ̄ ̄ ̄ | | ̄
   ___________| |

Name: 現金化 2011-06-16 0:47

クレジットカード 現金化 http://www.2222222222.net/
ショッピング枠 現金化 http://www.k-t-gift.com/

Name: Anonymous 2011-07-20 11:04


Learn to use code tags.

Name: jjk 2012-04-04 21:58


Don't change these.
Name: Email:
Entire Thread Thread List