error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double'

Discussion in 'C' started by sdmahapatra, Jun 20, 2009.

  1. sdmahapatra

    sdmahapatra New Member

    Joined:
    Jun 16, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Hi all C++ experts,I am new in C++ & got an
    error C2664: 'F_Ite' : cannot convert parameter 1 from 'double *' to 'double' . please anyone help me out fron this problem & please tell me something about this whitch help me in future.
    Thanks

    Code:
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]
    #include[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]<iostream>
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]#include[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]<cmath>
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]#include[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]<algorithm>
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] std; [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// you should not use this statement.
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] F_Ite([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// never ever declare global data in C++
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Globally Data_type Declaration & Initialization :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] z=0.0001;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NR=0.01;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NI=11;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] RF;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] main([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] argc, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]char[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]* argv[]) [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// put the othe arguments for main (int argc, char* argv[]) 
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Result Of A Fibonacci_Search Algorithm Operation On A Given Function :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nThe Function is ' F(x)=e^(-x)+x^2 '"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// declare your pointers outside of your function and pass them as parameters to F_Ite
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *a,*b,*c,*d,*Fc,*Fd,I;
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// you could optionally initialise them before passing them to your function
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] numElement =20;
    a = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][numElement];
    b = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][numElement];
    c = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][numElement];
    d = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][numElement];
    Fc= [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][numElement];
    Fd= [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][numElement];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// now call the function
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]F_Ite(a,b,c,d,Fc,Fd);
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// Now you can cout your values, or do whatever with them
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// don't forget to delete them when you're done.
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// wherever you create something with 'new' you should
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// always call 'delete' when finished!
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//User Specify The Interval :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nGive The Initian Point :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\na1 ="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cin >> a[1];
    std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nGive The Final Point :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nb1 ="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cin >> b[1];
    
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Find Distance Between The Starting Interval :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]I=(b[1]-a[1]);
    std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nInterval Reduction At The Initial Iteration :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]<< [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nI(1) = "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << I <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//For Accuracy Exactness Need A Small Pertubation At The Final Interval
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nFor Accuracy At The Final Interval, Taken The Small Perturbation z :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nTaken z = 0.0001"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Give The Prescribe Interval Reduction :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nNeeded The Prescribe Interval Reduction :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nNR = 0.01 units"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Calculate The Number Of Iteration From The Given Interval Reduction :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//By Fibonacci Series
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nAccording To The Interval Reduction"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nThe Requring Number Of Iteration :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nNI = 11 times"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    system([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"pause"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]); [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// this is a platform specific call. do not use this.
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//To Calculate The Ratio of two consecutive Fibo_Num (F(m-1)/Fm) :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Function (F(m-1)/Fm) Declaration :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] R_Fibo();
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nBefore The Start Of Interval Reduction"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nThe Ratio of two consecutive Fibo_Num :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]<<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nRF = 0.618056"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Here The Beginnins Of Iteration Technique 
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//We Introduce Two Another Points For Getting Two New Interval Of Uncertainty
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//First Point 'c1' And Second Point 'd1' :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]c[1]=b[1]-(R_Fibo()*I);
    std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nPlaced A Point c1 Within The Initial Interval :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]<< c[1];
    d[1]=a[1]+(R_Fibo()*I);
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nPlaced Another Point d1 Within The Initial Interval :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]<<d[1];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Showing The Starting Reduction :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//----------------
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//----------------
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"At The First Iteration :\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of a1="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << a[1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of b1="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << b[1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of c1="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << c[1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of d1="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << d[1] ;
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Function 'Fc1' at point 'c1' And Function 'Fd1' at point 'd1':
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//--------------------
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// write a function which takes one argument and returns the value. use it here instead of explicit coding.
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Fc[1]=(exp(-c[1]))+(c[1]*c[1]);
    std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nAt c1 The Function Value Fc1="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << Fc[1];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout <<"\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Fd[1]=(exp(-d[1]))+(d[1]*d[1]);
    std::cout << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nAt d1 The Function Value Fd1="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << Fd[1];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//---------------------
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//---------------------
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//system("pause");
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// this must be defined outside of main and called here explicitly.
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    
    
    
    
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] In=b[NI]-a[NI];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nThe Interval Reduction At The Final Iteration :"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nI(n)= "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << In;
    std::cout<<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [] a;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [] b;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [] c;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [] d;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [] Fc;
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delete[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [] Fd;
    
    std::cout << std::endl;
    system([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"pause"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//return 0;
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]}
    
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Ratio of two successive terms of Fibonacci Sequence is obtained using Binet's Formula
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Function (F(m-1)/Fm) Defination :
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] R_Fibo()
    {
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] n1=1-(sqrt(([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])5));
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] n2=1+(sqrt(([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])5));
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] s=(n1/n2);
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//cout << "\nsThe Value Of s = " << s <<"\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] s1=(sqrt(([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])5)-1)/2;
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//cout << "\nThe Value Of s1 = " << s1 <<"\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] RF=s1*((1-pow(s,NI))/(1-pow(s,(NI+1))));
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout << "\nThe Ratio of two consecutive Fibo_Num :"<<"\nRF = " << RF <<"\n"; 
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout << RF; 
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] RF;
    } 
    
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// pass values into F_Ite() function
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] F_Ite([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *a, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *b, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *c, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *d, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *Fc, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *Fd)
    { [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//F_Ite Function Start
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]for[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] k=1;k<(NI-1);k++)
    { [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Main 'for' Loop Start
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    system([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"pause"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"At The "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]<<k+1<<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" Iteration :\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](Fc[k]<Fd[k])
    { [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Outer 'if' Start
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]a[k+1]=a[k];
    cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of a"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << a[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    b[k+1]=d[k];
    cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of b"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << b[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//c[k+1]=b[k+1]-(0.618034*((1-pow(-0.381966,NI-k))/(1-pow(-0.381966,NI-k+1))))*(b[k+1]-a[k+1]);
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//cout <<"The Value Of c" << k+1 << "=" << c[k+1] << "\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](k==(NI-1))
    {
    c[k+1]=c[k+1]+z;
    cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of c"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << c[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    }
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
    c[k+1]=b[k+1]-(0.618034*((1-pow(-0.381966,NI-k))/(1-pow(-0.381966,NI-k+1))))*(b[k+1]-a[k+1]);
    cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of c"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << c[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    }
    d[k+1]=c[k];
    cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of d"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << d[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    Fc[k+1]=(exp(-c[k+1]))+(c[k+1]*c[k+1]);
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of Fc"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << Fc[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout <<"The Value Of Fc" << k+1 << "=" << Fc[k] << "\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Fd[k+1]=Fc[k];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout <<"The Value Of Fd" << k+1 << "=" << Fc[k] << "\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of Fd"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << Fd[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    
    } [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Outer 'if' Close
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{ [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Outer 'else' Start
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]a[k+1]=c[k];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of a"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << a[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    b[k+1]=b[k];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of b"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << b[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    c[k+1]=d[k];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of c"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << c[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//d[k+1]=a[k+1]+((0.618034)*((1-pow((-0.381966),(NI-k)))/(1-pow((-0.381966),(NI-k+1)))))*(b[k+1]-a[k+1]);
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout <<"The Value Of d" << k+1 << "=" << d[k+1] << "\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](k==(NI-1))
    {
    d[k+1]=d[k+1]+z;
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of d"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << d[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    }
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
    d[k+1]=a[k+1]+((0.618034)*((1-pow((-0.381966),(NI-k)))/(1-pow((-0.381966),(NI-k+1)))))*(b[k+1]-a[k+1]);
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of d"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << d[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    }
    
    Fc[k+1]=Fd[k];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout <<"The Value Of Fc" << k+1 << "=" << Fd[k] << "\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of Fc"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << Fc[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    Fd[k+1]=(exp(-d[k+1]))+(d[k+1]*d[k+1]);
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of Fd"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << k+1 << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << Fd[k+1] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//std::cout <<"The Value Of Fd" << k+1 << "=" << Fd[k] << "\n";
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]} [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Outer 'else' Close
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]} [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Main 'for' Loop Close
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Another 'if' Condition Start But Within The 'for' Loop
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](Fc[10]<Fd[10])
    {
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\nAt Final Iteration :\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    a[NI]=a[NI-1];
    b[NI]=d[NI-1];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of a11 ="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << a[NI] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of b11 ="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << b[NI] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    }
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
    a[NI]=c[NI-1];
    b[NI]=b[NI-1];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of a11 ="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << a[NI] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    std::cout <<[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"The Value Of b11 ="[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] << b[NI] << [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"\n"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
    }
    } [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//F_Ite Function Close
    [/COLOR][/SIZE][/COLOR][/SIZE]
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    The error is actually quite clear. F_Ite takes doubles (according to the function prototype), and you're passing in double arrays.

    Also your prototype doesn't match the function itself. Here's your prototype:
    Code:
    void F_Ite(double,double,double,double,double,double);
    
    and here's the function itself:
    Code:
    void F_Ite(double *a, double *b, double *c, double *d, double *Fc, double *Fd)
    
    So I think your prototype is wrong.

    Also there is an error on this line:
    Code:
    using namespace std; // you should not use this statement.
    
    There's nothing wrong with "using" statements; this means you don't have to clutter your code with loads of "std::" all over the place.

    Also bollocks, although it's amusing that you have global data declared immediately after this false statement:
    Code:
    // never ever declare global data in C++
    
    It's true that you should try to avoid global data wherever possible because of the dependencies it creates, but if you truly have data that is used all over the program then it doesn't make any sense to hide it in a function and to have to keep passing pointers to it all over the place.

    I agree with the comment, but why then is it in the code?
    Code:
    system("pause"); // this is a platform specific call. do not use this.
    
    Why is this correct statement commented out (although it should return EXIT_SUCCESS, not zero):
    Code:
    //return 0;
    
    Unnecessary comment. The point of comments is to explain the thinking behind the code, not to extend the syntax with unnecessary statements of the obvious. It's obvious that this is the F_Ite function start; you don't need a comment that says it is:
    Code:
    void F_Ite(double *a, double *b, double *c, double *d, double *Fc, double *Fd)
    { //F_Ite Function Start
    
    Same again. However I'm getting the feeling that this is code aimed at absolute beginners so if that's the case then the overcommenting is probably a learning tool. But please drop this as soon as possible and use comments to EXPLAIN the code, not just to RESTATE the code in other words:
    Code:
    for(int k=1;k<(NI-1);k++)
    { //Main 'for' Loop Start
    
     
    shabbir likes this.
  3. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    So when faced with an error you don't understand, think about the LITERAL meaning of EXACTLY what it says. Usually you'll find that most errors are written in pretty plain language. They mean you've done something wrong, so you have to accept that and work out what it is that you've done wrong. Often failure to understand errors comes from the (wrong) conviction that you've done nothing wrong and the compiler doesn't know what it's talking about, and that is not a useful starting point.
     
  4. sdmahapatra

    sdmahapatra New Member

    Joined:
    Jun 16, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    yes I will follow your suggestion and thank you for your kind touch.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice