Thread: Geophysics student needs help in running a C++ program

  1. #1
    Unregistered
    Guest

    Geophysics student needs help in running a C++ program

    Hi Everyone

    I am having trouble running a C++ program which has been developed by an American Geophysics scientist. I need to program to help me calculate UTM conversions which is an integral part of my project. The problem I have is that Turbo C says that it cannot include the header file even though I have included the header files in C:\TC\INCLUDE\...........the programs I am trying to run are LatLong-UTMconversion.cpp and UTMConversions.cpp.............does anybody have any idea on why I am getting this error? I am running Turbo C++ 3.0 on a installation of Win2k Professional. I actually got 7 errors but I think the other 5 errors are because the header files couldn't be included.........hence I am not paying much attention to them..........can anyone help me out with this problem? Any kind of help would be greatly helpful and appreciated

    Thank you

    Raj
    Oops, I forgot the link..........ftp://rajkanneganti.hypermart.net/utm.zip(the headers files and the program)

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Have you explicly told the program to include those headers before compilation?

    If you have a header in your include path (as it seems you have) then declare in your code;

    Code:
    #include <myheaderfile.h>
    
    int main(void){
    
    //blah blah
    
    }
    Simply puting it in the proper directory will not suffice.

  3. #3
    Unregistered
    Guest
    Thanks for the quick reply Fordy

    Yes, the header files have been included........I'm pretty sure abt that..............btw, the link I posted in the previous post does not seem to work so here is a new one http://rajkanneganti.hypermart.net/utm.zip...........Fordy, why dont you check those files out? they are only 5k in all

    Raj

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    That link gives an access violation. Use...

    http://rajkanneganti.hypermart.net

    ... and then browse, (and delete the wretched popup!!!). I got the same error compiling with VC++. I changed the name of the .h file to LatLong.h, and the references to it in the program and then it stopped complaining. Try that, (remember to change it in each of the files), it is possible certain compilers do not like really long names.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    2
    adrian

    have you got the program to run after that? I am able to compile the program without any errors and warnings but it just refuses to compile........it says linker error in some .asm file........any other hints people?

    Raj

  6. #6
    Registered User
    Join Date
    Jan 2002
    Posts
    2

    Unhappy

    somebody please help

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> have you got the program to run after that

    Yes. There are a couple of hard coded Lat/Long co-ordinates in there, running the program with them gives the following output...

    >>>
    Starting position(Lat, Long): 47.3782 8.2325
    Calculated UTM position(Northing, Easting, Zone): 5247475.33300 442063.49206
    32T
    Calculated Lat, Long position(Lat, Long): 47.37817 8.23250

    Calculated Swiss Grid position(Northing, Easting): 247631.47656 659872.60312
    Press any key to continue
    <<<

    ... what does the text of the error message say? (Bear in mind we are using different compilers).

    Side note - don't bump your threads, it is against the rules here.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Replies: 10
    Last Post: 04-07-2008, 09:14 AM
  3. FAQ : running program inside program (spawn)
    By nipun in forum C Programming
    Replies: 3
    Last Post: 06-13-2004, 02:30 PM
  4. Why is my program running away?
    By badkitty in forum C++ Programming
    Replies: 4
    Last Post: 09-19-2001, 04:27 PM
  5. Running program
    By muffin in forum C Programming
    Replies: 5
    Last Post: 08-30-2001, 10:57 AM