8 points · by rhr · 17y ago · 8 comments
I am trying to learn programming on my own but find myself getting stuck a lot. For example, I just wrote the simple maxLine program from K&R as an exercise, the compiler, gcc, gives me the following error when I define a symbolic constant MAXLINE=1000 in the code, but happily compiles the code when I use int 1000 directly:
maxLine.c:21: error: expected expression before ‘=’ token
so my question is, is there a good website/mail group where I can get help on these kind of issues, something very trivial to experts but could take me hours to figure it out.
thanks
Before even using IRC I would google it. Google will get you on the right track most times if you just google the compiler error. They usually only come up when you mess up in a particular way so you should be able to intuit what's going on. Though on this particular error it just means that you messed up on the syntax of the define statement. (hint no equals... #define MAXLINE 100) The third or fourth result is someone with the exact same problem.
Another alternative is to take an OSS project and read, make changes. Typically all the makefiles, etc are correctly setup. There are some excellent videos on-line as well.
http://rubymentor.rubyforge.org/wiki/wiki.pl
and python
Archive View by: Downloadable version
January 2027: [Thread|Subject|Author|Date] [Gzip'd Text 597 bytes ]
I just so like the idea of an archive from 2027 ...