good day,

I am an incoming 2nd year IT student and am encountering a problem in creating a "turtle graphics"(from the famous Logo Language) program using C. This case is found in the book of deitel and deithel, "C how to program" in the chapter of Arrays.
it has almost been a week, and still haven't finish 1/8 of the program..

pls.. i really need help!!!

tnhank you!!!!

-patrick

Using Standard Code:
1. You need a class to tell the turlte, aka the pen, direction, color, steps, etc.
2. You need a console menu that can input direction, steps, color, etc
3. You need to draw the turtle using a specific character like '@'. Instead of dynamically outputting the characters to the console output, you should use a matrix to define the "canvas". Then you can just print the matrix. This illiminates display problems and gives your tutle a working region. Be sure to prevent out of index problems with your matrix.

Using The Windows Api:

1. You need a class to tell the turlte, aka the pen, direction, color, steps, etc.
2. You need a windows API implementation of an editable client area that supports user input for direction, steps, color, etc.
3. You need to create a buffered BMP file in memory then draw the turtles action to that buffer. When you are done drawing on the buffer BitBlt the BMP resource to a client region (if you are using a resource script this should already be defined in the rc file).

Wasn't sure if you wanted to actually draw graphics or to just print letters on a console window, so I gave you a short how-to in both.

Using Standard Code:
1. You need a class to tell the turlte, aka the pen, direction, color, steps, etc.
2. You need a console menu that can input direction, steps, color, etc
3. You need to draw the turtle using a specific character like '@'. Instead of dynamically outputting the characters to the console output, you should use a matrix to define the "canvas". Then you can just print the matrix. This illiminates display problems and gives your tutle a working region. Be sure to prevent out of index problems with your matrix.

Using The Windows Api:

1. You need a class to tell the turlte, aka the pen, direction, color, steps, etc.
2. You need a windows API implementation of an editable client area that supports user input for direction, steps, color, etc.
3. You need to create a buffered BMP file in memory then draw the turtles action to that buffer. When you are done drawing on the buffer BitBlt the BMP resource to a client region (if you are using a resource script this should already be defined in the rc file).

Wasn't sure if you wanted to actually draw graphics or to just print letters on a console window, so I gave you a short how-to in both.

thats C++ though, not C

Thanks for resurrecting a thread to point that out.
:rolleyes:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.