![]() |
|
#21
|
|||
|
|||
Re: Linked Lists advice requestUsing the second program(?) you posted on page 1 of this yesterday I had taken this approach to designing a structure to hold the entire triangle as an object (that is I think it would be an object):
CPP / C++ / C Code:
I see your now getting different user input,, so then just calculate the x and y of the points. The main thing is , you can just refer to those six values defining the three points of the triangle and manipulate all six any way you want. For example a function could be made to loop through them all with the adjustment for your rotation. Glad to see your making some headway. Take it slow and compile/run often as you go. Handle mistakes as soon as possible instead of 50 lines down the road !! Hi to the queen for us, Howard; |
|||
|
#22
|
|||
|
|||
Re: Linked Lists advice requestWow! That's impressive... thanks for putting so much effort in!
At the moment I'm trying to translate the user input for centre point coordinates and size to be used by the prog to draw lines: CPP / C++ / C Code:
this bit (lines 65-68 inclusive): CPP / C++ / C Code:
Quote:
|
|
#23
|
|||
|
|||
Re: Linked Lists advice requestD'oh
(fixed it -> you don't need to tell me!) ; ) |
|
#24
|
|||
|
|||
Re: Linked Lists advice requestI've put in your Triangle thing:
CPP / C++ / C Code:
...and I'm getting the following errors that I can't seem to shake: Quote:
|
|
#25
|
|||
|
|||
Re: Linked Lists advice requestI don't really understand what you've put at the end after the functions, but it seems related to the errors
|
|
#26
|
|||
|
|||
Re: Linked Lists advice requestWell, it worked on other computers and it's very nice... but I need to change it so that the user doesn't enter co-ords for each vertex (it's for little kiddies).
So I'm looking at using a rotation matrix and doing some normalising of coords for the rotation (calc of relativ new coords); and then the poxy size adjust anim. ...lots of switches to tap in this aft too. CPP / C++ / C Code:
|
|
#27
|
|||
|
|||
Re: Linked Lists advice requestQuote:
It refers to the gnu gcc/ g++ compiler that I am using which I found here: 'http://www.cs.colorado.edu/~main/cs1300/doc/bgi/bgi.html' It shouldn't effect things IF it is still commented out. These errors: Quote:
Hence those functions: line, setcolor and initwindow are not being found. Are you compiling the same way you did when you were drawing a line successfully? I see that in the header you are using this: #include "graphics_lib.h" Keep in mind that you must then have that file, "graphics_lib.h" , in your pwd (present working directory (the same directory as the .c file)) ...as opposed to using like this: #include <graphics_lib.h> ...where you compiler will look for it automatically in the compilers "includes" directory. At least that's been my experience so far. Howard; PS: you DO realize that this SECOND thread is now about to go to 4 pages... Try to refrain from sending gobs of non-pertinent info. |
|
#28
|
|||
|
|||
Re: Linked Lists advice requestQuote:
Although I get 0 errors or warnings on compiling, I get the same 4 errors mentioned above when I go to build .exe: Same compiler... I posted that GIF to show that I had the "graphics_lib.h" in the same file as the .c file. When I changed the #include to CPP / C++ / C Code:
Quote:
I've put the "graphics_lib.h" file in every bloody folder there is in my c programming folders... I mean it is where its supposed to be as far as I can tell. |
|
#29
|
|||
|
|||
Re: Linked Lists advice requestA stupid question but what about permissions on the file, I've had such problems before .
max |
|
#30
|
|||
|
|||
Re: Linked Lists advice requestPermissions? -no he's using XP I believe.
OK , So your first run was finding the graphics_lib.h then. This second is definitely not. There should be a companion .cpp or .a file that goes along with it. On mine it's libbgi.a and I put it in the compilers lib directory. I was getting linking errors similar to yours when that second file was not in place. I don't know exactly how that gets used, but it's essential. They both came with the cs1300 I am using for this I downloaded from the colorado.edu site I mentioned above. - What compiler is it that both your university and laptop are using? - Did you get your laptop's graphics_lib.h from the university or out on the web somewhere. See if there is some info at your university about the winbgi installation they are using. Try to match it on your laptop. If all else fails, download the cs1033 gcc for win32 setup from the above site above. 30mb but I'm liking having gcc in windows! Good luck, gotta go, Howard; |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| triangle (polygon), drawing, sizing, and rotation programme using linked lists... | promsan | C Programming Language | 12 | 14-May-2007 15:03 |
| Doubly linked lists in C++ | sweeeeeeetlipss | C++ Forum | 1 | 24-Oct-2006 00:27 |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 14:12 |
| help on linked lists any1????? | nick4 | C Programming Language | 1 | 17-May-2004 10:32 |
| linked lists, newbie needs help | moltarim | C Programming Language | 4 | 06-May-2004 12:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The