Click here to Skip to main content
15,893,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUsing interruptions Pin
Cedric Moonen15-Feb-05 22:07
Cedric Moonen15-Feb-05 22:07 
GeneralRe: Using interruptions Pin
Branislav16-Feb-05 23:36
Branislav16-Feb-05 23:36 
Generalwrite wav file HELP!! Pin
anaknakal15-Feb-05 21:02
anaknakal15-Feb-05 21:02 
GeneralCreate a list view dialog Pin
Nguyen Hoang Canh15-Feb-05 19:42
Nguyen Hoang Canh15-Feb-05 19:42 
GeneralRe: Create a list view dialog Pin
David Crow16-Feb-05 2:39
David Crow16-Feb-05 2:39 
QuestionCan i disable the One Page/Two Page button in the print preview window? Pin
sureshpillai15-Feb-05 16:01
sureshpillai15-Feb-05 16:01 
AnswerRe: Can i disable the One Page/Two Page button in the print preview window? Pin
Roger Allen16-Feb-05 1:58
Roger Allen16-Feb-05 1:58 
GeneralRe: Can i disable the One Page/Two Page button in the print preview window? Pin
AnoopVarma16-Feb-05 17:15
AnoopVarma16-Feb-05 17:15 
GeneralNagging Menu Check Problem Pin
LighthouseJ15-Feb-05 14:09
LighthouseJ15-Feb-05 14:09 
GeneralRe: Nagging Menu Check Problem Pin
Ravi Bhavnani15-Feb-05 14:44
professionalRavi Bhavnani15-Feb-05 14:44 
GeneralSteps to make a clickable area drawn by a user at run time Pin
joy00715-Feb-05 14:01
joy00715-Feb-05 14:01 
GeneralRe: Steps to make a clickable area drawn by a user at run time Pin
JWood15-Feb-05 14:56
JWood15-Feb-05 14:56 
GeneralRe: Steps to make a clickable area drawn by a user at run time Pin
Maximilien16-Feb-05 0:34
Maximilien16-Feb-05 0:34 
GeneralHelp Needed ASAP PLZ on downloading url content to file. Pin
A.Sal15-Feb-05 13:24
A.Sal15-Feb-05 13:24 
GeneralRe: Help Needed ASAP PLZ on downloading url content to file. Pin
vinnzy15-Feb-05 13:43
vinnzy15-Feb-05 13:43 
GeneralRe: Help Needed ASAP PLZ on downloading url content to file. Pin
Ravi Bhavnani15-Feb-05 15:13
professionalRavi Bhavnani15-Feb-05 15:13 
GeneralRe: Help Needed ASAP PLZ on downloading url content to file. Pin
A.Sal16-Feb-05 0:17
A.Sal16-Feb-05 0:17 
Generalhelp with the operator overloading Pin
Flydian15-Feb-05 13:16
Flydian15-Feb-05 13:16 
GeneralRe: help with the operator overloading Pin
Bob Ciora16-Feb-05 1:34
Bob Ciora16-Feb-05 1:34 
Generalproblem returning arrays Pin
aaadetos15-Feb-05 13:05
aaadetos15-Feb-05 13:05 
GeneralRe: problem returning arrays Pin
John R. Shaw15-Feb-05 13:32
John R. Shaw15-Feb-05 13:32 
GeneralRe: problem returning arrays Pin
aaadetos15-Feb-05 16:12
aaadetos15-Feb-05 16:12 
GeneralRe: problem returning arrays Pin
$8816-Feb-05 20:30
$8816-Feb-05 20:30 
GeneralRe: problem returning arrays Pin
Branislav17-Feb-05 0:19
Branislav17-Feb-05 0:19 
GeneralRe: problem returning arrays Pin
aaadetos22-Feb-05 1:27
aaadetos22-Feb-05 1:27 
Yes, the suggestions worked, including $88's. What is your take on this code?
<br />
#include <br />
#include "stdafx.h"<br />
#include <br />
#include <br />
#include <br />
using namespace std;<br />
<br />
double a[10000],b[10000],x[10000],expint[10000],beta[10000],dimP2[10000];<br />
double t[50],alpha[50],dimP[50];<br />
int i,j;<br />
<br />
double ei(double x[10000])<br />
{<br />
double a0,a1,a2,a3,a4,a5,b1,b2,b3,b4,c1,c2,c3,c4;<br />
<br />
a0 = -0.57721566;<br />
a1 = 0.99999193;<br />
a2 = -0.24991055;<br />
a3 = 0.05519968;<br />
a4 = -0.00976004;<br />
a5 = 0.00107857;<br />
<br />
b1 = 8.5733287401;<br />
b2 = 18.059016973;<br />
b3 = 8.6347608925;<br />
b4 = 0.2677737343;<br />
<br />
c1 = 9.5733223454;<br />
c2 = 25.6329561486;<br />
c3 = 21.0996530827;<br />
c4 = 3.9584969228;<br />
<br />
if (x[i]<=0)<br />
{<br />
expint[i] = -999;<br />
}<br />
<br />
if (x[i]>=1)<br />
{<br />
a[i] = pow(x[i],4)+(b1*pow(x[i],3))+(b2*pow(x[i],2))+(b3*x[i])+b4;<br />
b[i] = pow(x[i],4)+(c1*pow(x[i],3))+(c2*pow(x[i],2))+(c3*x[i])+c4;<br />
expint[i] = (1/(x[i]*exp(x[i])))*a[i]/b[i];<br />
}<br />
<br />
if((0 {<br />
expint[i] = a0+(a1*x[i])+(a2*pow(x[i],2))+(a3*pow(x[i],3))+(a4*pow(x[i],4))+(a5*pow(x[i],5))-log(x[i]);<br />
}<br />
return expint[i];<br />
}<br />
<br />
double time_hr()<br />
{<br />
double N=49.0;<br />
for (int i=0;i<50;i++)<br />
{<br />
t[i] = 0.01*exp((i/N)*log(10/0.01));<br />
}<br />
return t[i];<br />
}<br />
<br />
double pD()<br />
{<br />
double rw = 0.25;<br />
double ac = 43560;<br />
double A = 80*ac;<br />
<br />
double len_b = sqrt(0.5*A);<br />
double len_a = 2*len_b;<br />
double len_ri =0.5*sqrt(pow(len_a,2)+pow(len_b,2));<br />
<br />
alpha[i] = (-(pow(rw,2)/(4*A*t[i])));<br />
<br />
for(int i=0;i<50;i++)<br />
{<br />
for(int j=0;j<10000;j++)<br />
{<br />
dimP2[j] +=-(0.5*ei(-(1/(4*A*t[i]))*(j+1)*pow(len_ri,2)));//*<br />
}<br />
dimP[i]=(-0.5*ei(alpha[i]))+dimP2[j];//**<br />
}<br />
return dimP[i];<br />
}<br />

At lines * and **, i got the error c2664:
'ei':cannot convert parameter 1 from double to double[]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.