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 strongm 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

    ...= {0}, C[size],c,d; double PI = 3.141592653589793238462643383279502884197; void rah(double C[]) { for (int i=0;i<size;i++) { A[i] = sqrt(10*i); B[i] = 2*PI*i; C[i] = A[i]*B[i]; } } double test()//how do i write this correctly? { rah(C); d = PI * rah(C[5]); } int main(int...
  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

    ...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 = var1 - var2; } else { y_1 = 1; } if (hx/ax<1) { var1 =...
  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

    ...angles to radians, acceptable in C++ //--------------------------------------------------------- //Dip Angle,p double a(double p) { d11 = cos((p*pi)/180); return d11; } double b(double p) { d13 = -1*sin((p*pi)/180); return d13; } double c(double p) { d31 = sin((p*pi)/180); return d31...
  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

    ...angles to radians, acceptable in C++ //--------------------------------------------------------- //Dip Angle,p double a(double p) { d11 = cos((p*pi)/180); return d11; } double b(double p) { d13 = -1*sin((p*pi)/180); return d13; } double c(double p) { d31 = sin((p*pi)/180); return d31...
  9. aaadetos

    2d array multiplication

    ...angles to radians, acceptable in C++ //--------------------------------------------------------- //Dip Angle,p double a(double p) { d11 = cos((p*pi)/180); return d11; } double b(double p) { d13 = -1*sin((p*pi)/180); return d13; } double c(double p) { d31 = sin((p*pi)/180); return d31...
  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

    ...angles to radians, acceptable in C++ //--------------------------------------------------------- //Dip Angle,p double a(double p) { d11 = cos((p*pi)/180); return d11; } double b(double p) { d13 = -1*sin((p*pi)/180); return d13; } double c(double p) { d31 = sin((p*pi)/180); return d31...
  14. aaadetos

    2d array multiplication

    ...to convert the angles to radians, acceptable in C++ //--------------------------------------------------------- double rad_t(double t) { theta = (t*pi)/180; return theta; } double rad_p(double p) { phi= (p*pi)/180; return phi; }...
  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

    ...double t[50],qsf[50],alpha,x[50],EI[50],beta[50],pd[50],pwf[50]; double time_hr() { double N=49.0; for (int i=0;i<50;i++) { t[i] = 0.01*exp((i/N)*log(200/0.01)); } return t[i]; } //In the Presence of Wellbore Storage double wbs() { a0 = -0.57721566; a1 = 0.99999193; a2 =...
  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

    ...double t[50],qsf[50],alpha,x[50],EI[50],beta[50],pd[50],pwf[50]; double time_hr() { double N=49.0; for (int i=0;i<50;i++) { t[i] = 0.01*exp((i/N)*log(200/0.01)); } return t[i]; } int main(int argc, char* argv[]) { // printf("Hello World!\n"); ofstream outputdeck...
  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