OS X - Apps and Games Discussion of applications and games available for Mac OS X.

Graphics.h and device.h in xcode 3.2.2


Post Reply New Thread Subscribe

 
Thread Tools
Pritha Gupta

 
Member Since: May 06, 2010
Posts: 2
Pritha Gupta is on a distinguished road

Pritha Gupta is offline
Hey i have snow leopard 10.6.
I want to use graphics.h and device.h header in xcode 3.2.2 for my project so please can anyone tell me the way how to use these libraries in my project.
</code>
#include "stdafx.h"
#include <graphics.h>
#include <conio.h>

void main()
{
int gd=DETECT, gm;
initgraph(&gd,&gm,"");

int x,y, j=250 ;

setbkcolor(WHITE);
setcolor(LIGHTBLUE);

outtextxy(3,5," I am so stupid hyong I am so stupid sorry sorry !!! "); // output "line" text

x = getmaxx();
y = getmaxy();

x=j;

line(j,0,x,y);

x = getmaxx();
y = getmaxy();

y=j;

line(0,j,x,y);
/*void line(int x0, int y0, int x1, int y1)

{
POINT line[2];
line[0].x = x0;
line[0].y = y0;
line[1].x = x1;
line[1].y = y1;
drawpoly(2, (int*)&line);
}
*/

getch();

closegraph(); // escape graphic mode
}
</code>
I want to use this library only as it is in my coarse.

Last edited by Pritha Gupta; 07-28-2010 at 09:01 AM.
QUOTE Thanks

Post Reply New Thread Subscribe


« Itunes playlist problems | Any cool demos or stuff out there? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 08:34 PM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?