Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. aaadetos

    Unhandled Exception

    Hi, I have a dialog-based MFC application, which compiles w/out error, but yields an unhandled exception in C:\...\MFC\SRC\WINCORE.CPP when i try to run it, as shown in the code below. What could be the reason for this? How do i correct it? HWND hWnd = ::GetDlgItem(m_hWnd, nID); if (hWnd !=...
  2. aaadetos

    Array problem

    Hi, im trying to use the specific value of an array in a computation in another function; but don't know how to set it up. In test(), i want to use the 6th value of C[] in the computation. How do i set this up please? #include "stdafx.h" #include <cmath> const int size = 10; double A[size] =...
  3. aaadetos

    More Problems : 2d array multiplication

    Thanks a lot...6. is real humour...tells u how "cautious" im thinking...lol!
  4. aaadetos

    More Problems : 2d array multiplication

    Thanks, ArkM. I already replaced the while with if...else loops. Here's the new code: double vargm() { double h_x,h_y; lagh = sqrt(pow(hx,2)+pow(hy,2)); if (t == 0 && p == 0) { if (lagh<ay) //lagh/ay<1 { var1 = 1.5*sqrt(pow(lagh/ax,2)); var2 = 0.5*pow(pow(lagh/ax,2),3); y_1 =...
  5. aaadetos

    2d array multiplication

    Salem, >>Thanks a lot guys. I really appreciate it. B4 I saw Salem's post, I'd already implemented this formulation, which runs consistently with Excel/hand calculations for the matrix multiplication.<< My next implementation was created b4 i saw your post. i was in the process of posting that...
  6. aaadetos

    More Problems : 2d array multiplication

    Can someone please tell me why vargm() is crashing in main()? // Q3.cpp : Defines the entry point for the console application. // #include <math> #include "stdafx.h" #include <iostream> using namespace std; double t, p; //azimuth and dip angles respectively double lambda1 = 2.2; double...
  7. aaadetos

    2d array multiplication

    That was a typo. PI wasn't my problem anyway...and frankly, i don't need such high accuracy for PI... double PI = 3.141592653589793238462643383279502884197; is not necessary for me. but thanks for pointing it out.
  8. aaadetos

    2d array multiplication

    Thanks a lot guys. I really appreciate it. B4 I saw Salem's post, I'd already implemented this formulation, which runs consistently with Excel/hand calculations for the matrix multiplication. I still don't quite understand why the values were becoming '0' in mult()[saw this when i ran in "debug"...
  9. aaadetos

    2d array multiplication

    changing my function prototype doesn't correct the problem. Can someone please help me out? Am I not multiplying the arrays correctly? Here's the new code for a more simplistic case: // Q2_new.cpp : Defines the entry point for the console application. // #include <math> #include "stdafx.h"...
  10. aaadetos

    2d array multiplication

    New Problem: Now I'm doing the multiplication, where I'm trying to multiply the arrays in this order: lambda_array*dip_array*azim_array*r_array what am i doing wrong? all my values in the final range array, fr_array are all zero, which shouldn't be the case... Here's the code. // Q2_new.cpp...
  11. aaadetos

    2d array multiplication

    Ok....I moved the initialization to after I called the functions, not before. So the arrays are reading correctly now. This was the problem.
  12. aaadetos

    2d array multiplication

    math.h does contain sin() and cos(); and when you do a random check, say cout<<a(p);, i actually get the correct value. but the correct values are not turning up in my arrays. Please check and see. Why is this?
  13. aaadetos

    2d array multiplication

    Still can't figure out why the arrays aren't yielding the proper values: // Q2_new.cpp : Defines the entry point for the console application. // #include <math> #include "stdafx.h" #include <iostream> using namespace std; double theta, phi, t, p; //azimuth and dip angles respectively double...
  14. aaadetos

    2d array multiplication

    Hi, I have the ffg code, where I hope to muliply the 3 arrays specified, but on running Printarray(), i'm not getting what I expect. Help please! // Q2_new.cpp : Defines the entry point for the console application. // #include <math> #include "stdafx.h" #include <iostream> using namespace std...
  15. aaadetos

    Problem w/ error c2664...

    I thought it would be okay, since the prototype for the ei function is: double ei(double x[10000]), which passes an array to the ei function.
  16. aaadetos

    Problem w/ error c2664...

    Hi, the ffg code gave the ffg 2 errors:'ei':cannot convert parameter 1 from double to double[] on both lines * and ** in the code below: #include <math> #include "stdafx.h" #include <fstream> #include <iomanip> #include <iostream> using namespace std; double...
  17. aaadetos

    problem returning arrays

    Now, i have a new dilemma.. #include <math> #include "stdafx.h" #include <fstream> #include <iomanip> #include <iostream> using namespace std; const double PI = 3.141592653589793238462643383279502884197; double q = 1000;//STB/D double pi = 5000;//psia double rw = 0.25;//ft double h = 100;//ft...
  18. aaadetos

    problem returning arrays

    timmay3141, thank you so much. i'm indeed grateful...this is the solution i didn't c. many thanks again!
  19. aaadetos

    problem returning arrays

    I have the following code, which runs w/out erroe, but fails to return the proper values... #include <math> #include "stdafx.h" #include <fstream> #include <iomanip> #include <iostream> using namespace std; const double PI = 3.141592653589793238462643383279502884197; double q = 1000;//STB/D...
  20. aaadetos

    integrating a function

    Thanks, timmay3141 and globos; I eventually wrote the integral thus, but have a problem calling it: double* function(double *p,double *func,int nSize,CKuchukDlg *pDialog); void qgaus(double *ans, int nSize, CKuchukDlg *pDialog) { enum{nSize = 6}; //elements of the integral double xr,xm,dx...

Part and Inventory Search

Back
Top