Visual C++ and Borland C++...

MrElusive

Banned
Dec 10, 2001
87
0
0
I'll admit I'm an amateur when it comes to programming in C++. My schools computers use Borland and I personally hate Borland so I use Visual C++. I have noticed a few differences coding wise such as the coding for random numbers and such. One thing I cannot figure out is what the graphics header file for Visual C++ is. For Borland my teacher said it is <graphics.h>. If I try this in Visual it says it is an undeclared identifier. Can someone clue me in on this one? I'm not a great programmer at C++ so keep the terms pretty basic. I'm taking a course over the summer for me to better my weaknesses. Please respond.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If you want to pass use what your school uses, especially when you involve MS products. VC has a lot of 'features' that aren't normal in C++, especially VC 6 because it was released before the C++ standard was ratified (or whatever they call it)

And if you get into using different libraries and headers you're projects will be nothing like the rest of the classes, which will pretty much guarantee you'll fail if for no other reason than the teacher can't compile and test your code (if he does)
 

Gaunt

Senior member
Aug 29, 2001
450
0
0
When you say you want "graphics" what exactly do you mean? You want to do stuff with OpenGL, DirectX, or just simple drawing on the window?

Are you using the visual portions of Borland or Visual C++ to do the work? By that I mean, are you using Borland's Visual Creation Libraries (VCL), or Microsoft's MFC? If you are using VCL and want to do simple graphics, it is very easy since you are provided with Image and Paint box controls, if memory serves me. With Visual C++, you will have to go through the trouble of learning what a Device Context (DC) is, and how you can use that to draw to the window.

I hope this has helped a bit. It's been a while since I've worked with C++ Builder, but when I started I much preferred Borland to Visual C++. There is a huge difference, especially if you're working on a User Interface. Borland provides you with much easier to use components for your windows, as compaired to Visual C++, where working with User Interfaces is sort of like trying to pull your own teeth... awkward and painful.

If you need more clarification, just let me know.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I think he means they're using Borland's older C++ compiler that's basically a text editor and compiler, not C++ Builder.

And IIRC graphics.h was the Borland Graphics Interface for working with VGA graphics in DOS.
 

MrElusive

Banned
Dec 10, 2001
87
0
0
Well basically I copied some code off the teacher so we could look at some basic drawing in dos. It's just a bunch of 2D balls bouncing around the screen. Easily amused as usual, I wanted to modify it a little. It's very plain and I just wanted to try it out.