ThinkC program--why wont it work?

David H. Thornley thornley at cs.umn.edu
Fri Mar 8 12:35:36 AEST 1991


In article <91065.143433EAO102 at psuvm.psu.edu> EAO102 at psuvm.psu.edu (Ernie Oporto) writes:
>OK......here's more of a problem.
>I inserted the following lines inside of the create_t_window function:
>WIND *t_windinfo;
>WindowPtr t_window;
>That seemed to have cleared up my problems with their being declared, but
>now ThinkC is telling me that my #included files can't be openned.
>Now what am I doing wrong?  Below is the source code:
>
One thing you are doing wrong is using #include "WindowMgr.h" rather
than the more reliable #include <WindowMgr.h>.  You also have to make
sure that the #include files are in the folder that includes THINK C,
or in a subfolder of that.

You are also not following the usual guidelines for posting.

First, we use a rejoinder RTFM, which is an acronym for "Read The
Manual".  In this case, you don't seem to have studied the
documentation.  There is also a comment RTFAQ, which refers
to the "Frequently Asked Question" list that is posted here
monthly.  If you intend to use C much, and are not thoroughly
familiar with it (and you apparently aren't), I would suggest
reading the FAQ carefully.  There are a lot of good solutions
to common problems there.

Second, it is usually best not to post program fragments this long.
You should try to reproduce your problem in as few lines as possible.

The reason behind these two is that it makes things easier on
everyone.  When you post a question, it should be something
that is giving you trouble that can't easily be resolved by
yourself, and it should be easy to look at so people can try
to see what is going wrong.  There are plenty of really smart
people who post here, and who will generally take a crack at
problems if you give them the impression that it is worth it.
If you don't care enough to RTFM, or to trim the program causing
the problem down to manageable size, why should they care to
solve the problem?

Third, you should be more specific.  What version of THINK C are you
using?  How was it installed?  Is it all on a hard disk or are you
operating off floppies?  You might also want to mention the computer
and system being used, since it might make a difference.  (If you
try running a program compiled with 68020 and 68881 options on a
vanilla SE, it won't work.)

Fourth, you are in danger of being flamed for posting a question
on a specific C implementation; some will probably insist that
this be posted on comp.sys.mac.programmer, which isn't a bad group
to consider for THINK C problems.  On the other hand, lots of other
people do it for other systems (ms-dos, unix, whatever).  It is best
to post questions like "How do I manage Mac menus" on the system-
specific group, posting only questions about C (like this one) here.

This is not intended as a flame, but as suggestions for getting
the best use out of this group.  Happy computing!

DHT



More information about the Comp.lang.c mailing list