Jump to content
manxten

[Grafica c++] Afisare graf

Recommended Posts

salut!

Am o problema la grafica in c++. Vreau sa citesc un graf (orientat) din fisier(numar de noduri, numar de muchii, si muchiile) si sa il reprezint grafic, dar nu prea imi iese daca mai scot muchii(ma incurc la coordonatele de reprezentare ale nodurilor).

Am urmatorul graf:

View image: 1

Primul exemplu(functioneaza bine)

Am fisierul:

View image: 2 1

Ce imi afiseaza c++:

View image: 2

Al doilea exemplu(scot muchia 2-5)

Am fisierul:

View image: 3 1

Ce imi afiseaza C++:(imi pune 6 peste 5 si 7 peste 8)

View image: 3

Codul sursa:

http://pastebin.com/EjgBbWFq

Astept pareri cum as putea sa rezolv chestia asta sau alta idee cum sa il afisez

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...