Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Heap error Pin
simoncoul5-Jun-07 8:10
simoncoul5-Jun-07 8:10 
GeneralRe: Heap error Pin
Matthew Faithfull5-Jun-07 8:55
Matthew Faithfull5-Jun-07 8:55 
GeneralRe: Heap error Pin
simoncoul5-Jun-07 9:53
simoncoul5-Jun-07 9:53 
GeneralRe: Heap error Pin
simoncoul5-Jun-07 9:58
simoncoul5-Jun-07 9:58 
GeneralRe: Heap error Pin
Matthew Faithfull5-Jun-07 10:28
Matthew Faithfull5-Jun-07 10:28 
GeneralRe: Heap error Pin
Michael Sadlon5-Jun-07 12:01
Michael Sadlon5-Jun-07 12:01 
GeneralRe: Heap error Pin
simoncoul6-Jun-07 3:56
simoncoul6-Jun-07 3:56 
GeneralRe: Heap error Pin
simoncoul6-Jun-07 4:03
simoncoul6-Jun-07 4:03 
Sorry I didn't see those messages post before I posted my last one. I am using visual studio 2005, and I do not believe that I am writing outside of the heap. I don't think I can e-mail u the whole code as it is for a program that is IP of the school I am working at but this is the part that is causing me all the problems.

int K=1000;//sampling point in x and z direction
Complex *Ey_z_C,*Ey_z_L,*Ey_x,*z_prime;
Ey_x= new Complex [K];
Ey_z_C=new Complex [K];
Ey_z_L=new Complex [K];
z_prime=new Complex [K];

double *x_prime;
x_prime=new double [K];
Complex dz;

double n_eff_C = z_dir(dz,z_prime,Ey_z_C,K,N,n0_C,z);
double n_eff_L = z_dir(dz,z_prime,Ey_z_L,K,N,n0_L,z);

double dx;
double n_eff_x=x_dir(dx,x_prime,K,Ey_x,n_eff_C,n_eff_L,w);

Complex **Ey = (Complex**)malloc(sizeof(Complex*)*K);
for ( i =0; i < K; i++){
    Ey[i] = (Complex*) malloc(sizeof(Complex)*K);
}

double **I = (double**)malloc(sizeof(double*)*K);
//double** I = new double*[K];
j = 0;
while (j<K){
    // I[i] = new double[K];
    I[j] = (double*) malloc(sizeof(double)*K);
    j++;
}

AnswerRe: Heap error Pin
Stephen Hewitt5-Jun-07 14:33
Stephen Hewitt5-Jun-07 14:33 
GeneralRe: Heap error Pin
simoncoul6-Jun-07 8:41
simoncoul6-Jun-07 8:41 
QuestionUsing STL iterator as class member variable [modified] Pin
Anton1125-Jun-07 5:27
Anton1125-Jun-07 5:27 
AnswerRe: Using STL iterator as class member variable Pin
David Crow5-Jun-07 5:33
David Crow5-Jun-07 5:33 
GeneralRe: Using STL iterator as class member variable Pin
Anton1125-Jun-07 5:52
Anton1125-Jun-07 5:52 
AnswerRe: Using STL iterator as class member variable Pin
Arman S.5-Jun-07 5:55
Arman S.5-Jun-07 5:55 
GeneralRe: Using STL iterator as class member variable Pin
Anton1125-Jun-07 6:05
Anton1125-Jun-07 6:05 
QuestionTCPIP Socket error Pin
NorGUI5-Jun-07 4:59
NorGUI5-Jun-07 4:59 
QuestionRe: TCPIP Socket error Pin
David Crow5-Jun-07 5:27
David Crow5-Jun-07 5:27 
AnswerRe: TCPIP Socket error Pin
Mark Salsbery5-Jun-07 7:04
Mark Salsbery5-Jun-07 7:04 
QuestionDll used by app Pin
garfield1855-Jun-07 4:52
garfield1855-Jun-07 4:52 
AnswerRe: Dll used by app Pin
David Crow5-Jun-07 5:39
David Crow5-Jun-07 5:39 
GeneralRe: Dll used by app Pin
garfield1855-Jun-07 6:20
garfield1855-Jun-07 6:20 
QuestionCasts Pin
tom groezer5-Jun-07 2:18
tom groezer5-Jun-07 2:18 
AnswerRe: Casts Pin
Nibu babu thomas5-Jun-07 2:35
Nibu babu thomas5-Jun-07 2:35 
AnswerRe: Casts Pin
Rajkumar R5-Jun-07 2:37
Rajkumar R5-Jun-07 2:37 
AnswerRe: Casts Pin
jhwurmbach5-Jun-07 2:42
jhwurmbach5-Jun-07 2:42 

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.