943,923 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 5553
  • C RSS
You are currently viewing page 1 of this multi-page discussion thread
Jan 10th, 2007
0

Graphics in C

Expand Post »
Hmm,first sorry for some grammar mistakes...
I have a big problem with graphics in C... For 2 days i'm looking on internet and nothing...I saw some theards and posts but none of the lib didn't work...(It was forums on my language )
I'm working in VS 6.0 I saw here that lib "graphics.h" is old as a Rome,and i lost my time on it for 2 days,because i didn't figure why program wont work.
Can anybody tell me how can i do graphics in C...I find some function for windows but always get 1 warning,for conversion...
Or suggest some book or tut for it...
I look at one theard,where someone posted one link with lib "graphics2" but that didn't work too..
P.S I'm newcomer in programming
Tnx...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dukiduki is offline Offline
7 posts
since Jan 2007
Jan 10th, 2007
0

Re: Graphics in C

It's kind of hard to read your post, but I don't blame you...

graphics.h is a header file that is only for Turbo C, so don't bother trying to use it.

Are you trying to write console or Windows graphics? For console graphics, you can't use libraries such as DirectX or OpenGL. Usually the easiest method to use on Windows is to use the Win API to do your console graphics. I suggest you start here:
http://www.daniweb.com/code/snippet173.html

For going further, use Google; there's tons of information out there.

If you're trying to do Windows graphics, I recommend not using the Windows HDI and instead use an external library such as SDL, OpenGL, DirectX, etc. Also, I suggest you check out this thread on game development:
http://www.daniweb.com/techtalkforums/thread63827.html

Hope this helps
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jan 11th, 2007
0

Re: Graphics in C

I'm very sorry I didn't have many chance to have chat on English...
My knowlege is enough for undrestanding it and read it.
I was on google ofcourse and i didn't find anything what will work (i was looking for one-two days,maybe i should more)
I work in console application...
I find one book on google but there i saw "graphics.h" and i lost one hour writing code which won't work...
Tnx ...I will look that link u posted...
See,I live in Serbia i supose u heard on the news, something is true most is not,but that is not important. Because of that problems IT here is still in process...I go to private univeristy,we have software (OS is for free(ofcourse not in companys),well most of software we get here for free)that is good thing...
BUT,we don't have good books...Our translations are sad,and it is not rare that code is wrong in books.So we have only internet but most of the good books are not for free. So image how much would cost me to order something from USA etc? I'm sorry for this i wrote,but i don't want anybody think that i'm molly girl who is lazy...And want someone else solve my probs...I realy need help because i'm really short with everything.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dukiduki is offline Offline
7 posts
since Jan 2007
Jan 11th, 2007
0

Re: Graphics in C

Click to Expand / Collapse  Quote originally posted by dukiduki ...
Hmm,first sorry for some grammar mistakes...
We can help you out with that a little. To make your posts more understandable, English uses spaces after commas (,) and periods (.). For example, note the space after that comma. And also note the space after that period. This will help. The rest we can figure out.

As for graphics, as Joe said you have to find a graphics package that you can add to your compiler. This and this Google search may give you something to work with.
Moderator
Reputation Points: 3278
Solved Threads: 894
Posting Sage
WaltP is offline Offline
7,738 posts
since May 2006
Jan 11th, 2007
0

Re: Graphics in C

>>Our translations are sad,and it is not rare that code is wrong in books.
It is not your translator -- our books have those mistakes too.

>>most of the good books are not for free
One reason people write books is to make money, and they can not do that if they give their work away for free.

>>My knowlege is enough for undrestanding it and read it.
you do that very well, better than many native english-speaking people.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Jan 11th, 2007
0

Re: Graphics in C

Check this. Here you have OpenGL and graphics programming tutorial.
Reputation Points: 251
Solved Threads: 29
Posting Whiz in Training
andor is offline Offline
274 posts
since Jun 2005
Jan 12th, 2007
0

Re: Graphics in C

Quote originally posted by joeprogrammer ...
Are you trying to write console or Windows graphics? For console graphics, you can't use libraries such as DirectX or OpenGL. Usually the easiest method to use on Windows is to use the Win API to do your console graphics. I suggest you start here:
http://www.daniweb.com/code/snippet173.html
I copy that code in VS and it wont work, is that code C++? I didn't start learn C++ yet
I look on google ofcourse, but it takes very much time when u are newcomer and not really sure what am i looking for
I had exame in C today and i wanted to astonish my profesor with some colors on console.

Quote originally posted by WaltP ...
We can help you out with that a little. To make your posts more understandable, English uses spaces after commas (,) and periods (.). For example, note the space after that comma. And also note the space after that period. This will help. The rest we can figure out.
Tnx very much

Quote originally posted by Ancient Dragon ...
It is not your translator -- our books have those mistakes too.
One reason people write books is to make money, and they can not do that if they give their work away for free.
Ofcourse. Knowledge is expensive. It was just a comment. But see, here we give money only for hardware, we get used to have very good software for free. That is bad and it will change in a few years, but here majority have very small pays and nobody can have good things legal. When i saw how much windows cost i get shocked, appreciate that if i buy few programs it will cost like my computer.
And books...well i can say that some books in which i'm interested in have price like pay of my dad, so i can forget about buying it. I can only dig some knowledge on harder way.:eek:


To get back on subject. I see that i should look for programing tuts with win environment. I saw so much promiscuous codes and get really confused.
For graphics, well i have one book about game programming by Michael Morrison, but it is on C++, so i must wait for month or two because i didn't start learn C++. He sead (i will have trouble translate that) about DirectX that he wont use it for programing because it is compound tehnology. So i see that i should learn something about DirectX if i want use it...

Tnx u all for help very much
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dukiduki is offline Offline
7 posts
since Jan 2007
Jan 12th, 2007
0

Re: Graphics in C

Hello there my friend. I really respect your enthusiasm but you must go a bit slow. Talking about DirectX, graphics and all that when you are just learning C / C++ is too much.

Please learn to crawl before you start running. Get your concepts about the things which are not directly related to a particular language (eg. data structures, algorithms ) a bit cleared up.

As far as books are concerned, I know they are expensive. But if you really have in your heart then nothing can stop you.

For C related free stuff you can see here.

For a really good C++ ebook you can see here and also a good site for C++ tutorials.

Hope it helped, bye.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Jan 12th, 2007
0

Re: Graphics in C

Click to Expand / Collapse  Quote originally posted by dukiduki ...
I had exame in C today and i wanted to astonish my profesor with some colors on console.
Printing text in color on the console is relatively easy, although there's no standard way to do it. On Windows, you can use the Win API to do the trick; this code snippet describes how:
http://www.google.ca/url?sa=t&ct=res...QWjHNiaUX8suUw

And yeah, follow ~s.o.s~'s advice; he knows what he's talking about.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jan 15th, 2007
0

Re: Graphics in C

Click to Expand / Collapse  Quote originally posted by dukiduki ...
Hmm,first sorry for some grammar mistakes...
I have a big problem with graphics in C... For 2 days i'm looking on internet and nothing...I saw some theards and posts but none of the lib didn't work...(It was forums on my language )
I'm working in VS 6.0 I saw here that lib "graphics.h" is old as a Rome,and i lost my time on it for 2 days,because i didn't figure why program wont work.
Can anybody tell me how can i do graphics in C...I find some function for windows but always get 1 warning,for conversion...
Or suggest some book or tut for it...
I look at one theard,where someone posted one link with lib "graphics2" but that didn't work too..
P.S I'm newcomer in programming
Tnx...
U CAN TRY AT
WWW.flazx.com
I THICK THIS WILL HELP U
Reputation Points: 10
Solved Threads: 0
Newbie Poster
SID_HAN is offline Offline
2 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Count number of one's in 32 bits
Next Thread in C Forum Timeline: Error while compiling





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC