clrscr() isn't working in my msvc++ but it is in borland. do i have the right library, conio.h?
clrscr() isn't working in my msvc++ but it is in borland. do i have the right library, conio.h?
Never ceases to amaze me.......... hereOriginally posted by blight2c
clrscr() isn't working in my msvc++ but it is in borland. do i have the right library, conio.h?
Go with the "windows option"
MSVC++ doesn't have clrscr(). If you'd like to visit the FAQ you'll find a very nice screen clearing function that works with MSVC++.
-Prelude
My best code is written with the delete key.
thanks, i thought the windows option was just for gui stuff.Go with the "windows option"
sorry to ask such lame question . . . did i at least inflate your self-esteem though?
In MSVC++ I define cls and utilize it as a small function
ie...
This is way simple, but I've never had a problem this way. I hope that this helps you.Code:#include <iostream> #include <stdlib.h> //included in this library #define CLS() SYSTEM("CLS") //when I want to clear the screen I enter... int main(void) { int a(0); cout << "Enter a number: "; cin >> a; CLS(); cout << a; return 0; }
NopeOriginally posted by blight2c
did i at least inflate your self-esteem though?
Sorry...didnt mean to jump down your throat........
or you can transfer the library over.
isn't MSDEV a development tool?
you are not limited to the libraries provided.
think only with code.
write only with source.
Yes you are limited in the respect that a library written or say Turbo C might implement say printf() by addressing the video memory and changing its values......this is OK for dos based programs and the relevant library will contain the code to do this.....Originally posted by toaster
or you can transfer the library over.
isn't MSDEV a development tool?
you are not limited to the libraries provided.
But with windows you dont have direct access to video memory, so there is no way this code would work even if you got MSVC to accept the library....the MSVC library will implement printf() by processing the info given and then calling an API function (likely to be WriteConsoleOutput())....this API function then calls whatever lower level functions it need to actually change the video memory....
As you can imagine, the actual code that MSVC uses to implement a function will be drastically different from that of another compiler.....So therefore unless the library was explicitly written for your compiler....you cant use it