The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Contact TD
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Ztyx

Sweden
Posts

Posted - 07/14/2004 :  10:08:03 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
So I received the following error:

H:\Origin\mountaincheck.cpp(3) :Error, General Error ( ) contact TD.
H:\Origin\mountaincheck.cpp(3) :Error, error(s) found in compiling method
H:\Origin\mountaincheck.cpp(3) :Error, error(s) found in compiling method
H:\Origin\mountaincheck.cpp(10) :Error, general compile error
H:\Origin\mountaincheck.cpp(3) :Error, error(s) found in compiling function check_mountains

Compiling errors found, linking cannot start!

...and can't seem to figure out what the problem is. The compile error too comprehensive in this case. I've tried to rewrite the code so that it is as simple as possible (therefore it doesn't look too good). Here it goes:

#include <stdio.h>
#include <data.h>
#include <math.h>
#include <utilities.h>

void
check_mountains()
{
Dataset desta("Mountains", 0),destb("Mountains", 1),destc("Mountains", 2),destd("Mountains", 3),deste("Mountains", 4);
Dataset srca("task27b3refl_Date"),srcb("task27b3refl_azimuth"),srcc("task27b3refl_altitude"),srcd("task27b3refl_UVAs45a"),srce("task27b3refl_UVAs45");

/* load dest */
destb.SetSize(srca->GetSize());
destc.SetSize(srca->GetSize());
destd.SetSize(srca->GetSize());
deste.SetSize(srca->GetSize());
desta.SetSize(srca->GetSize());

for(int i=0;i<srca->GetSize();i++) {
if (srcd!=NANUM && srce!=NANUM && (1.0*srcd/srce)>1.3) {
for(int j=0;j<5;j++) {
desta[i]=srca[i];
destb[i]=srcb[i];
destc[i]=srcc[i];
destd[i]=srcd[i];
deste[i]=srce[i];
}
}
}

}


Anyone who can give me a hint?

Greetings from Germany,

Jens Rantil

easwar

USA
1965 Posts

Posted - 07/14/2004 :  12:16:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Jens,

Change
destb.SetSize(srca->GetSize());
to
destb.SetSize(srca.GetSize());

etc.

Easwar
OriginLab

Go to Top of Page

Ztyx

Sweden
Posts

Posted - 07/16/2004 :  08:43:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ah, thank you very much!
/J
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000