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] =...
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...
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...
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...
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...
The following code below is from a text on numerical recipes in C++...Its purpose is to evaluate the integral of a function, "func", using the Gaussian Quadrature formula, viz:
double qgaus(double func, double a, double b)
{
//elements of the integral
double xr,xm,dx,s; //s unrelated to...
Hi,
To retrieve data from my edit box, I decided to add a member function to my dialog's class, viz:
double CKuchukDlg::getrw(double x)
{
//Get Data from the edit box
CString strx;
GetDlgItemText(IDC_WELLRAD,strx);
x = atof(strx);
return x;
}
i then used the function in my math...
Hi,
I'm using the following code to try to get a double variable from an edit box, but I keep getting an error: c2660
[code]
double x=0;
CString strx;
......
for(int i=0;i<K,i++)
{
::GetDlgItem(IDC_WELLRAD,strA);//Error c2660
x=atof((LPCTSTR)strx);
...
}
How can I fix this...
How would one retreive data input from the keyboard into a dialog box, which the compiler would process at run-time? I thought that making an instance of the class object which contains the data would be enough; but this doesn't cut it. See the following code:
void unbound(double *unbd, int...
Must I dynamically allocate memory to variables that are to be user determined at run-time? For instance, I have this code...
void unbound(double *unbd, int nSize)
{
enum{nSize = 100};
double A[nSize],B[nSize],k0[nSize],k1[nSize],s[nSize],expi[nSize],a[nSize],b[nSize];
void bessk0(double...
Hi..
How would one pass a 2d array as a parameter? Say we have a function:
void whatever(double *age, int Size)//**
{
for (i=0;i<Size;i++)
{
for (j=0;j<Size;j++)
...
blah,blah,blah
age[i][j]=pow(blah,2);//ERRor c2109 : a subsript was used on a variable that was not an array
}
how would the...
I'm trying to write some code to an output file. The function reads data in text format and then tries to write results after the data has been processed in other source code. The resulting data (data to be written) is actually an array of values, but i get error c2679. The 2 codes are as...
Hi..I have a function which is to return an array...I probably need to pass the array as a reference or pointer; but I don't fully understand these. Asides from the fact that the code which I'll post below probably returns only a value, and not an array, I get error c2664 at 2 lines(as indicated...
Is there any disadvantage to instantiating a class object several times to point to the same variable when if the variable is used in deiiferent source files? What about if the same class object points to different member variables within a project?
I have a table of data, which is read from an input file; the code ignores the 1st 2 lines of the input file, "input.txt" [explanatory header text], then processes the numerical data and writed results to an output file. Do i need to specify that binary data is being written to have meaningful...
I have a couple of source files, which are to be executed in a single source file; On calling functions in other source files from the executing source file, I get the syntax error C2059.
The executing source file is shown below:
#include <math>
#include "stdafx.h"
#include "Kuchuk.h"
#include...
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.