This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

authored code not working

hey.

we put the code on before in the wrong place.

we have uploaded the code to rapidshare for you to see.

http://www.rapidshare.com

the program is tang.c

our problem is the code does not compile properly.

what is wrong?

Parents
  • 1) Do you think your link to rapidshare is a good link? Should it just link to Rapidshare? Not maybe to your uploaded file?

    2) Is it really needed to upload source code to Rapidshare? Isn't it possible to reduce the size of your application until it fits in a single post?

    3) "does not compile properly" is not directly descriptive. Do you get a compilation error? In that case - What source code line? What message? What does that code line look like, and any relevant lines earlier in the file or included?

    4) Have you spent any time yourself looking at the problem?

Reply
  • 1) Do you think your link to rapidshare is a good link? Should it just link to Rapidshare? Not maybe to your uploaded file?

    2) Is it really needed to upload source code to Rapidshare? Isn't it possible to reduce the size of your application until it fits in a single post?

    3) "does not compile properly" is not directly descriptive. Do you get a compilation error? In that case - What source code line? What message? What does that code line look like, and any relevant lines earlier in the file or included?

    4) Have you spent any time yourself looking at the problem?

Children
  • Where did you get the file names "8052.hg" and "stdio.hg" from?

    Where are the code for do_initialize()? How will the compiler know if do_initialize() takes any parameters - and what types?

    Where are the code for do_main_operations()? How will the compiler know if do_main_operations() takes any parameters - and what types?

    Is a goto the only way you know how to create an infinite loop? A tip - spend your first year with C programming without using a single goto. After that year, you can sit down and summarize your experiences and figure out how big needs there really are for a goto. Manage to get a goto into a 16-line program is very near a highscore. It is _very_ seldom that a goto is a recommended construct. And almost always, that would then be a forward goto - basically a "break" statement on steroids, to clean up in case of an error somewhere.

  • Against my better judgement, I just looked at your authored code.

    You use the word we - You write code using the "infinite monkey theorem" ?

  • Just a footnote - if you use // to create one-line comments - why do you use */ to end the comments?

    A // comment ends automatically at the end of the line. That's what makes it a one-line comment.

    Only a comment started with /* needs a */ as termination. Which is the reason why a /* ... */ comment can span multiple lines, or can be followed by more code on the same line.