Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute FORTRAN CODE From Visual C++

Status
Not open for further replies.

mythili

Programmer
Jul 15, 2002
9
US
Hi,
The Visual C++ program needs to run a FORTRAN code which inturn generates a DAT file.This DAT File is used by the Visual c++ progran to perform computation.Can u please suggest me someway to execute FORTRAN PROGRAM FROM visual C++(maybe a button click will invoke the execution of a fortran code)

 
Hi,

This should so the trick.

# C++ Source File

extern int __stdcall FORTRANFunction(int x, ...) ;

YourC++Function()
{
int x = 2, y = 10, r = 0 ;
r = FORTRANFunction(x) ;
}

HTH

William
Software Engineer
ICQ No. 56047340
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top