Archived

This topic is now archived and is closed to further replies.

Noxxid

Problem with Bloodshed

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites