Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

New semester

Sign in to follow this  


I'm in the second week of the spring semester. I am taking an Embedded control class right now. We are using C cmpiled for the C8051 microprocessor. Our lab manuals examples of code are absoultely attrocious. It has a chapter introducing C. This is the first program:

#include /* include file header*/

/* begin program here */
main(){ /* begin code block here */
printf("Hello World!\n");
/*Output text to console */

} /* end code block

I realize the assumed "void" on main is legal in C, but isn't it still considered bad practice? Every comment in the code uses the multiline comment no matter how many lines. The manual specifically says not to use // comments because they can cause strange errors... I would think /**/ comments are worse, since many students will be tempted to nest them and such.

Anyway, the class still looks fun. We are writing code for a "smart car" to follow a white line, as well as a self-controlled blimp.

I haven't done much with the Scene graph engine lately. I keep thinking of new ways to implement it. I think I will just go for a nice easy, unoptimized approach and just try to finish it for now. If I have time, I can always clean it up and rewrite portions.

I did manage to fix the memory leak. It was aparently due to a bad copy/paste job on my part. I was actaullty making two copies of each texture thsat I loaded,but only deleting one of the pointers. It was an easy fix, just delete the offending line...
Sign in to follow this  


Recommended Comments

If I recall my standards properly, single line comments (// comments) weren't legal in C until C99, which is why /**/ comments are the norm for C code.

Share this comment

Link to comment

Your avatar shows that you are still recovering from the effects of New Year's.

Unfortunately I went home for the break and was stuck with my parents, so no new years fun for me...

If I recall my standards properly, single line comments (// comments) weren't legal in C until C99, which is why /**/ comments are the norm for C code.

Hm... I've never heard that before. I know that the single line comments work fine in the compiler we are using. The instructor has definately been doing this for a while though.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!