Click here to Skip to main content
15,917,968 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I access a c# class from vc++? Pin
malayalite19-Nov-06 18:27
malayalite19-Nov-06 18:27 
GeneralRe: How do I access a c# class from vc++? Pin
Christian Graus19-Nov-06 18:32
protectorChristian Graus19-Nov-06 18:32 
GeneralRe: How do I access a c# class from vc++? Pin
malayalite19-Nov-06 18:48
malayalite19-Nov-06 18:48 
Questionabout VC+MySQL problem:) Pin
rxgmoral19-Nov-06 15:13
rxgmoral19-Nov-06 15:13 
AnswerRe: about VC+MySQL problem:) Pin
Christian Graus19-Nov-06 15:21
protectorChristian Graus19-Nov-06 15:21 
Questionarray of functions of two parameters Pin
jquan3278619-Nov-06 4:27
jquan3278619-Nov-06 4:27 
AnswerRe: array of functions of two parameters Pin
Mark Salsbery19-Nov-06 7:13
Mark Salsbery19-Nov-06 7:13 
AnswerRe: array of functions of two parameters Pin
CPallini20-Nov-06 3:48
mveCPallini20-Nov-06 3:48 
Hi Jessica,
seems to me you want to integrate a differential equation by Runge-Kutta method.
Your class ode expects (constructor):
(1) The starting time t0.
(2) The initial value of the x variable x0 (x(t0)).
(3) The ending time T.
(4) The functional description of the equation, strictly speaking, a pointer
to f(x,t), where x'(t)=f(x,t).

Now, while it is easy read from a text file three double values, reading the function definition it's not that easy. I suggest you to hard-code the function.
e.g.
double f(double x,double t)
{
  return 1. + x*x+t*t*t;
}

int main()
{
  int n=1000;
  ode part2(0., -4., 1., f);
  double* soln2 = part2.rungekuttaforward (n);
  return 0;
}


By the way, your code, has many troubles, I think.

Why do you put function definitions in cpp headers?
Why don't you protect your headers for multiple inclusions?
And so on.
Smile | :)
QuestionDisplay Waveform of MP3 Pin
quantumdecipher19-Nov-06 2:11
quantumdecipher19-Nov-06 2:11 
Question--------- Pin
Irwin.R19-Nov-06 0:03
Irwin.R19-Nov-06 0:03 
AnswerRe: Setting File Permissions Pin
PJ Arends19-Nov-06 0:26
professionalPJ Arends19-Nov-06 0:26 
QuestionCBitmap(HBITMAP) conversion to raw RBG image. Pin
harripyy_118-Nov-06 23:48
harripyy_118-Nov-06 23:48 
AnswerRe: CBitmap(HBITMAP) conversion to raw RBG image. Pin
Waldermort19-Nov-06 0:47
Waldermort19-Nov-06 0:47 
GeneralRe: CBitmap(HBITMAP) conversion to raw RBG image. Pin
harripyy_119-Nov-06 1:47
harripyy_119-Nov-06 1:47 
Questionthe difference of using custom control and picture ? Pin
cyn818-Nov-06 23:10
cyn818-Nov-06 23:10 
AnswerRe: the difference of using custom control and picture ? Pin
Mark Salsbery19-Nov-06 5:58
Mark Salsbery19-Nov-06 5:58 
GeneralRe: the difference of using custom control and picture ? Pin
cyn819-Nov-06 14:12
cyn819-Nov-06 14:12 
GeneralRe: the difference of using custom control and picture ? Pin
Christian Graus19-Nov-06 14:21
protectorChristian Graus19-Nov-06 14:21 
GeneralRe: the difference of using custom control and picture ? Pin
Mark Salsbery19-Nov-06 14:23
Mark Salsbery19-Nov-06 14:23 
GeneralRe: the difference of using custom control and picture ? Pin
cyn819-Nov-06 14:44
cyn819-Nov-06 14:44 
GeneralRe: the difference of using custom control and picture ? Pin
Mark Salsbery20-Nov-06 5:03
Mark Salsbery20-Nov-06 5:03 
QuestionHashing algorithms Pin
Waldermort18-Nov-06 20:51
Waldermort18-Nov-06 20:51 
AnswerRe: Hashing algorithms Pin
PJ Arends18-Nov-06 23:44
professionalPJ Arends18-Nov-06 23:44 
AnswerRe: Hashing algorithms Pin
El Corazon19-Nov-06 5:12
El Corazon19-Nov-06 5:12 
AnswerRe: Hashing algorithms Pin
Jörgen Sigvardsson19-Nov-06 5:36
Jörgen Sigvardsson19-Nov-06 5:36 

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.