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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Problem with porting C++ to SGI cc

Status
Not open for further replies.

jerryyyyy

Programmer
Dec 23, 2003
1
US
My old program is in C+ for the Microsoft compiler 6.0 but the new one from the SGI and so I can use a multiprocessor which itself only uses cc, which I believe is just the original old C compiler.

I am having problems with external variables no longer being seen within functions in the cc program. For example, in what is attached there is a variable "kappa_level" while is defined external to all functions and is read as a command line argument. This variable does not seem to make it into functions such as "computation()". I redefine it there and it is seen. This is funny because an array called "data" makes it through and all the means are calculated correctly. I had the same problem with a variable called "MISSING" that define missing values. When it was defined in the function all the means were correctly calculated. Any thoughts would be appreciated. A mystery.

PS program has been ported to Linux with no rewrite for I believe gcc.

Thanks in advance for the infor and this looks like a good forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top