I need help in Borland c++ and cin.get!!!

Hey guys, i was wondering that does borland c++ come with the "graphics.h" header. Because when i tried compiling my code the red box error sign came up next to the line of my graphics header. But when i looked into my include folder in my borland folder graphics wasnt there? why,how to i put a graphics.h file with into there? and yes i am a beginner. And also in borland c++ when i try compiling my simple code i can build it but when i run it it says "*programapllicationname* has stopped working". And "cin.get" is causing the issue
because when i use system pause or getch or any other code it works!!! Please tell me how to fix this! heres my code and this problem is only in borland not in any other compilers!

#include <iostream>

using namespace std;

int main()
{
cout << "Hello world!";
cout << endl;
cin.get();
return 0;
}





Should i just quit programming c++ and programming in general because of this? Please help, thanks! :) And PS. I know people might just say "just use something beside cin.get or dont compile with borland C++" I know that, but i just want it to work because one day im sure to come across the issue in a more serious time! :) and im using codeblocks mingw. I know visual is better but meh :P
graphics.h is a nonstandard header, that used to come with Dev C++ I think. I don't know really, never used it. Just know it's nonstandard and came with one compiler. I wouldn't use it.

Your cin.get() is being used wrong.
http://www.cplusplus.com/reference/iostream/istream/get/
Read that, and you should understand.

Should i just quit programming c++ and programming in general because of this?


Not at all. If everyone just gave up at their first issue, we would have no programmers. Programming is all about trial and error. I can't even tell you how many times I've ran into random mistakes that took me forever to find a solution to. Just keep at it.

im using codeblocks mingw. I know visual is better but meh


This is all just opinion, I prefer C::B over VS for most things. Free != worse.
I know visual is better but meh :P


I also contest that. :)
you need to include the namespace std;
type this
------->> using namespace std;
below the header, and also you can try
#include <cstdlib>
so you can use
------>> system("pause");
to freeze the screen
you need to include the namespace std;

OP did this, and it's not the best practice.

#include <cstdlib>

OP needs nothing from this header. system("pause") is not in a header. Also, bad practice.

Topic archived. No new replies allowed.