Error?

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "bg.h"
#include <fstream>
#include <iostream>
#include <math.h>

using namespace std;

int main()
{
     bgCreateWindow();  

     float x=-16;
     float y=0;

     bgClearScreen();  

     while(1)
     {
         while (x<-1)
         {
             bgClearScreen();

             bgDrawCircle (x,y,1); x+=.1; y+=.1;
             Sleep (10);
             bgUpdateDisplay();
         }
     while (x<15)
     {
         bgClearScreen();

         bgDrawBox (1+x,1+y,x-2,y-2); x+=.1; y-=.1;
         Sleep (10);
         BgUpdateDisplay();
     }
     while (x>1)
     {
         bgClearScreen();

         bgDrawTriangle (x-1,y+1,x+2,y+1,x-4,y-3); x-=.1; y-=.1;
         Sleep (10);
         BgUpdateDisplay();
     }
     while (x>-15)
     {
         bgClearScreen();

         bgDrawTriangle (x+0,y+1.5,x+0,y-.5,x+1,y-1);
         bgDrawTriangle (x+1,y+2.5,x+1,y-1.5,x+2,y-2);
         bgDrawTriangle (x+2,y+3.5,x+2,y-2,x+3,y-3); x=.1; y=.1;
         Sleep (10);
     }

     bgUpdateDisplay();

     bgPause();        

     bgDestroyWindow();

     return 0;   
}


There's an error, but I can't figure out where.
closed account (S6k9GNh0)
What error does your compiler give?
My computer is acting wierd, doesn't show it.

Edit: Oh wait. I fixed it. It says this:

||In function `int main()':|
|39|error: `BgUpdateDisplay' was not declared in this scope|
|39|warning: unused variable 'BgUpdateDisplay'|
|47|error: `BgUpdateDisplay' was not declared in this scope|
47|warning: unused variable 'BgUpdateDisplay'|
||=== Build finished: 2 errors, 2 warnings ===|
Last edited on
C++ is case sensitive: you are calling 'BgUpdateDisplay' but the right function name should be 'bgUpdateDisplay'
Lol, that was easily a bad mistake on my part. Thanks.
Topic archived. No new replies allowed.