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
  • 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.

Reply
  • 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.

Children
  • 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.