Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Please help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help



At 22:03 Uhr +0100 24.03.2005, Yuan wrote:
I'm a beginner in C programming language, we use TurboC2.0 compiler in the labs but I have apple so I use Xcode at home to practice. We solved an array program in the lab today, the program read in at most 20 real numbers into an array, and then print the number closest to the average of the 20 numbers. But when I try the same problem at home Xcode compiles with errors saying that (array subscript is not an integer) also (stray '\32' in program), I never had this kind of problems with other programs which works in TC2.0 . The source code is as follows:

Except for some style things (like declaring i without a type, which gives you an "int" but is bad style), your code looks okay.


If you ask me, I'd say you have "gremlins" (aka unprintable characters) in your source code file. Try to run it through a filter (text soap, BBEdit, whatever you have or can find) to remove those characters. Or simply retype your text into a fresh text file (don't copy & paste -- that would simply copy along the gremlins).
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Student-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Please help (From: Yuan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.