468,512 Members | 1,561 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

'ypos' is assigned a value that is never used .

Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2.  
  3. #include <graphics.h>
  4.  
  5. #include <stdlib.h>
  6.  
  7. #include <conio.h>
  8.  
  9. #include <bios.h> 
  10.  
  11.  
  12.  
  13. void main()
  14.  
  15. {
  16.  
  17.       int grd, grm;
  18.  
  19.       int num, xpos, ypos, i, j, index;
  20.  
  21.  
  22.  
  23.       detectgraph(&grd,&grm);
  24.  
  25.  
  26.  
  27.       initgraph(&grd, &grm, "");
  28.  
  29.  
  30.  
  31.       if( graphresult() != 0)
  32.  
  33.       {
  34.  
  35.             printf("Unable to find Graphics driver");
  36.  
  37.             return;
  38.  
  39.       }
  40.  
  41.  
  42.  
  43.       num = getmaxcolor();
  44.  
  45.       settextjustify(CENTER_TEXT, CENTER_TEXT);
  46.  
  47.       xpos = getmaxx() / 2;
  48.  
  49.       ypos = getmaxy() / 2;
  50.  
  51.  
  52.  
  53.       setbkcolor(BLUE);
  54.  
  55.       setcolor(WHITE);
  56.  
  57.       rectangle(1,1,getmaxx() - 1, getmaxy() - 1);
  58.  
  59.  
  60.  
  61.       for(j = 1; j <= 11; j++)
  62.  
  63.       {
  64.  
  65.             circle(30, j * 40, 18);
  66.  
  67.             circle(getmaxx() - 30, j * 40, 18);
  68.  
  69.       }
  70.  
  71.  
  72.  
  73.       index = 0;
  74.  
  75.       for(i = BLUE + 1; i < num; i++)
  76.  
  77.       {
  78.  
  79.             setcolor(i);
  80.  
  81.             outtextxy(xpos,50 + (index++ * 30),"Welcome to http://www.google.com");
  82.  
  83.       }
  84.  
  85.       getch();
  86.  
  87.       closegraph();
  88.  
  89.  
  90.  
  91. }
Output:
Error: Function 'intigraph' should have a prototype

:'ypos' is assigned a value that is never used
Apr 21 '21 #1
1 1406
dev7060
431 Expert 256MB
Error: Function 'intigraph' should have a prototype
Spelling?

:'ypos' is assigned a value that is never used
Says it all.
May 6 '21 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

49 posts views Thread by matty | last post: by
21 posts views Thread by Steven T. Hatton | last post: by
1 post views Thread by leeon0220 | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.