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 !=...
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] =...
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 =...
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...
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...
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.
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"...
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"...
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...
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?
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...
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...
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.