www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/01/10/08:58:18

From: sngattan AT matt DOT ksu DOT ksu DOT edu (Down and Under)
Subject: GnuC problems
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Sun, 10 Jan 93 7:18:33 CST

Hello:

	I have four questions regarding GnuC:

1.	Even though I have made an execuatble version of my program,
	I cannot run it on a PC which does not have Gnuc?  WHY?

2.	I am trying to use simple graphics commands in my program.

	Following is the code:

	#include <stdio.h>
	#include <graphics.h>
	#include <pc.h>

	int i,x1,y1,x2,y2;
        int color;

	GrSetMode (GR_default_graphics);
	for (i = 0; i < 256; i++) {
		GrSetColor (i, i, i, i);
	}

	x1 = 40;
	y1 = 40;
	x2 = 300;
	y2 = 250;

        color = 2;
	GrLine (x1,y1,x2,y2,color);
	while ((i = getkey()) != 27);	/* wait for escape key */
	GrSetMode (GR_default_text);
	
end of code....................

	What is wrong in the above code?

3.	Also, if I have to mark a circle or any other symbol at a 
	data point (x,y), how do I do it?

4.	If I need to print in some data stored in a variable MEAN
	as part of graphics, how do I do it?

	Any help in this matter will be appreciated.  Thanks.
			
						sanjay
						sngattan AT matt DOT ksu DOT ksu DOT edu


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019