i make that program but this program is giving an error please debug the error

#include <conio.h>
#include <stdio.h>


int main()
{
    int i;
    printf("This is the first line.\n");
    gotoxy(10,4);
    printf("This is the second line.\n");
    gotoxy(20,8);
    printf("And this is line 3.\n");

    return 0;

}

Thanks,,....

Recommended Answers

All 8 Replies

gotoxy is not a standard C function, so you need other library for that.

This is one of the problems with learning to program with an ancient compiler such as Turbo C -- you don't know the difference between compiler-specific functions and standard C.

Yep.

@OP: Go for MinGW or Codeblocks/MinGW package.

The GCC does not supply gotoxy() with <conio.h>.

Since it is a Windows program, why not use the SetConsoleCursorPosition() function?

If you are using POSIX, let me know.

gotoxy is not a standard C function, so you need other library for that.

can you tell me which library
thanks,...

dear can u make a complete program because still i cant understand please

Read the tutorial in the last link he posted. If you can't understand that then you have no business attempting to write complicated programs; get yourself an Introduction to C++ programming book and start studying from page 1, not the back of the book.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.