i dont know if this the appropriate forum for this question,

I wrote few programs on turbo c++ ide and they work perfectly fine. but when i try to compile the same code in openSUSE 10.2 , i get errors like : clrscr not recognised, clreol not recognised, gotoxy not recognised and several other errors. im using gcc4.1.2 . It would be helpful if someone can explain what is wrong here. :-|

thnx for reading the post.

That is becuase the functions which you mentioned are compiler specific (Turbo C specific) and not part of the standard library. They can be easily removed and circumvented or replaced. For a list of all standard functions in C and C++ see this...

As an example, you can remove getche() and replace it with getchar () which is a standard C function and so on. Post the code in question and we will help you out.

Except, depending on the code, getchar() is not a direct replacement for getche(). Additional coding may be necessary.

There are many functions that you are using that have no equivalent -- in fact nearly all; if there were exact equivalents then the programmer would have used those instead, most likely.

This snippet supplies Linux code for gotoxy() and clrscr(): http://www.daniweb.com/code/snippet64.html

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.