Problem with Bloodshed
I''m using Bloodshed as my compiler and when I enter this code...
//Graphics Test
#include <iostream.h>
#include <conio.h>
#include "graphics.h"
int main()
{
lineto(100,100);
getch();
return 0;
}
it keeps giving me these errors:
[Warning] In function "int main()":
implicit declaration of function ''int lineto(...)''
Can anyone tell me how to correct this?
I had a problem with Bloodshed as well. The best idea (in my opinion) would be for you to use Visual C++ .net.
____________________________________________________________________________________________________________________
The weather is cool, and there are grey clouds covering the sky. Or at least I wish the weather was like that.
____________________________________________________________________________________________________________________
The weather is cool, and there are grey clouds covering the sky. Or at least I wish the weather was like that.
Is that all the code you are trying to compile? If so, that error seems to me like you don''t have lineto(100,100) declared. I know in C you need to have a function prototype. Basically copy: int lineto(arg1, arg1) :something like that if your returning an int, or void if nothing is being returned.
Dev-C++ isn''t the same as Borland.
You might have better luck using DirectX, OpenGL, Allegro, etc, to draw lines.
You might have better luck using DirectX, OpenGL, Allegro, etc, to draw lines.
if lineto isnt your own function, you need tto include the header that did declare the function.
he cant find the function lineto() now.
he cant find the function lineto() now.
The header iostream.h is deprecated, use iostream. The header conio.h is non-standard, its contents aren''t going to be or do the same thing between implementations. The header graphics.h I assume is from BGI, which is non-standard and only old Borland compilers supported. Even if you were using an old Borland compiler that did have BGI, that code wouldn''t work because you never setup BGI (with initgraph, I think?).
If
Lineto(100,100);
is a function that you have made yourself,
then you need to include the following to tell the compiler it exists(put it b4 int main()):
Lineto(*)
*insert the parameters you want to define at the time the function is called here.
Lineto(100,100);
is a function that you have made yourself,
then you need to include the following to tell the compiler it exists(put it b4 int main()):
Lineto(*)
*insert the parameters you want to define at the time the function is called here.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement