943,770 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 771
  • C RSS
Aug 3rd, 2009
0

gotxy function REPLY

Expand Post »
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,,....
Similar Threads
Reputation Points: -1
Solved Threads: 0
Newbie Poster
furqankhyraj is offline Offline
14 posts
since Aug 2009
Aug 3rd, 2009
0

Re: gotxy function REPLY

gotoxy is not a standard C function, so you need other library for that.
Last edited by 9868; Aug 3rd, 2009 at 9:53 am.
Reputation Points: 45
Solved Threads: 7
Light Poster
9868 is offline Offline
36 posts
since Mar 2009
Aug 3rd, 2009
0

Re: gotxy function REPLY

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Aug 3rd, 2009
0

Re: gotxy function REPLY

Yep.

@OP: Go for MinGW or Codeblocks/MinGW package.
Reputation Points: 651
Solved Threads: 35
Posting Whiz in Training
yellowSnow is offline Offline
201 posts
since Jul 2009
Aug 3rd, 2009
0

Re: gotxy function REPLY

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.
Featured Poster
Reputation Points: 1140
Solved Threads: 229
Postaholic
Duoas is offline Offline
2,039 posts
since Oct 2007
Aug 3rd, 2009
0

Re: gotxy function REPLY

Click to Expand / Collapse  Quote originally posted by 9868 ...
gotoxy is not a standard C function, so you need other library for that.
can you tell me which library
thanks,...
Reputation Points: -1
Solved Threads: 0
Newbie Poster
furqankhyraj is offline Offline
14 posts
since Aug 2009
Aug 3rd, 2009
0

Re: gotxy function REPLY

Wow, look a gift horse in the mouth...

If the library that ships with your OS isn't sufficient, or you want something portable (which <conio.h> isn't, BTW), try NCurses.

For Windows: http://pdcurses.sourceforge.net/
For POSIX: http://www.gnu.org/software/ncurses/
Getting started: http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
Featured Poster
Reputation Points: 1140
Solved Threads: 229
Postaholic
Duoas is offline Offline
2,039 posts
since Oct 2007
Aug 3rd, 2009
0

Re: gotxy function REPLY

Click to Expand / Collapse  Quote originally posted by Duoas ...
Wow, look a gift horse in the mouth...

If the library that ships with your OS isn't sufficient, or you want something portable (which <conio.h> isn't, BTW), try NCurses.

For Windows: http://pdcurses.sourceforge.net/
For POSIX: http://www.gnu.org/software/ncurses/
Getting started: http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
dear can u make a complete program because still i cant understand please
Reputation Points: -1
Solved Threads: 0
Newbie Poster
furqankhyraj is offline Offline
14 posts
since Aug 2009
Aug 3rd, 2009
0

Re: gotxy function REPLY

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: To form a palindrome of a given string
Next Thread in C Forum Timeline: Check my code: Get ten random unique numbers then store in array.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC