用C定义图形 [英] Defining a graph in C

查看:120
本文介绍了用C定义图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想定义一个图形,而不是一个具有一些节点和边缘的树,并且能够添加和删除节点和边缘(没有graphics.h库的帮助)。 tnx

解决方案

这是一个图形(我相信你也想说Graphics而不是Graph)对象和C不是创建图形对象的非常好的选择而你'还试图忽略要用于创建此类对象的任何库(graphics.h)。您将要找到的所有在线教程也可以很好地利用该库,所以没有它我不认为您可以创建它(除非您是专家或其他人)。



http://www.programmingsimplified.com/ c-graphics-programming-tutorial [ ^ ](也使用graphics.h库)。


这并不像看起来那么容易。

对于教程,请尝试使用grphics.h生成图形的程序 [ ^ ]。

I want to define a graph not a tree with some nodes and edges and be able to add and remove nodes and edges (no help of graphics.h library). tnx

解决方案

That is a graphics (I believe you also wanted to say Graphics instead of Graph) object and C is not very good choice for creating graphics objects and you're also trying to ignore any library (graphics.h) to be used in order to create such object. All of the online tutorials that you're going to find would also make a good use of that library, so without it I don't think you can create it (unless you're an expert or beyond).

http://www.programmingsimplified.com/c-graphics-programming-tutorial[^] (also uses graphics.h library).


This is not as easy as it appears.
For a tutorial, try C Program to generate Graph using grphics.h [^].


这篇关于用C定义图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆