Graphics in C

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2007
Posts: 7
Reputation: dukiduki is an unknown quantity at this point 
Solved Threads: 0
dukiduki's Avatar
dukiduki dukiduki is offline Offline
Newbie Poster

Graphics in C

 
0
  #1
Jan 10th, 2007
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...
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Graphics in C

 
0
  #2
Jan 10th, 2007
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
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 7
Reputation: dukiduki is an unknown quantity at this point 
Solved Threads: 0
dukiduki's Avatar
dukiduki dukiduki is offline Offline
Newbie Poster

Re: Graphics in C

 
0
  #3
Jan 11th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: Graphics in C

 
0
  #4
Jan 11th, 2007
Originally Posted by dukiduki View Post
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.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,413
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1470
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Graphics in C

 
0
  #5
Jan 11th, 2007
>>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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 275
Reputation: andor has a spectacular aura about andor has a spectacular aura about andor has a spectacular aura about 
Solved Threads: 29
andor's Avatar
andor andor is offline Offline
Posting Whiz in Training

Re: Graphics in C

 
0
  #6
Jan 11th, 2007
Check this. Here you have OpenGL and graphics programming tutorial.
If you want to win, you must not loose (Alan Ford)
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 7
Reputation: dukiduki is an unknown quantity at this point 
Solved Threads: 0
dukiduki's Avatar
dukiduki dukiduki is offline Offline
Newbie Poster

Re: Graphics in C

 
0
  #7
Jan 12th, 2007
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.

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

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
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,619
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Graphics in C

 
0
  #8
Jan 12th, 2007
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.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Graphics in C

 
0
  #9
Jan 12th, 2007
Originally Posted by dukiduki View Post
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.
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 2
Reputation: SID_HAN is an unknown quantity at this point 
Solved Threads: 0
SID_HAN's Avatar
SID_HAN SID_HAN is offline Offline
Newbie Poster

Re: Graphics in C

 
0
  #10
Jan 15th, 2007
Originally Posted by dukiduki View 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...
U CAN TRY AT
WWW.flazx.com
I THICK THIS WILL HELP U
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC