Function will not run

i was using the Dark GDK to create a program to draw a Octagon, but after debugging the first line I ran into a problem. When I step into the program the function does not run when i get to the call drawOctagon() part, it simply stops and states it cannot find the source. Help would be appreciated.




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "DarkGDK.h"

void drawOctagon(int,int);


void DarkGDK ( void )
{
	// PUT YOUR CODE HERE //
	int x,y;


	dbPrint("Please enter your X center point of the Octagon  ");
	x = atoi(dbInput());
	dbPrint("Please enter your Y center point of the Octagon ");
	y = atoi(dbInput());

	drawOctagon(x, y);
}



void drawOctagon(int centerx, int centery)
{


	int height = 20;
	int width = 20;
	
	int line1x, line1Y,line1BX,line1BY;
	int line2x, line2Y,line2BX,line2BY;
	int line3x, line3Y,line3BX,line3BY;
	int line4x, line4Y,line4BX,line4BY;
	int line5x, line5Y,line5BX,line5BY;
	int line6x, line6Y,line6BX,line6BY;
	int line7x, line7Y,line7BX,line7BY;
	int line8x, line8Y,line8BX,line8BY;


	line1Y = centery - height; line1x = centerx - (width / 2); line1BX = line1x + width; line1BY = line1Y;


		

	dbLine(line1x,line1Y,line1BX,line1BY);
}
Topic archived. No new replies allowed.