Borland C++ Help

I have been told (by my C prof.) that I can use the Borland C++ compiler to compile C. Fine.

How? I try to use Borland C++ Compiler 3.2. Everytime I start it up (this is from memory, as the software is at home, & I am in work) it starts me in a “Form”. Fine - I close that. Behiond the “Form” is what looks like a basic text editor, but when you go to save it, it give you a “C++ Project” extension - something like “.cpp”. Obviously I need, “.C”. So I change it. Fine.

When I edit my file and save it, and try to “Run” which should compile, give any error messages and then execute, it does that count-down / compile thing and then an error message about some debugger .dll file being non-existant.

Fine. Scrap that. I get onto borland.com and download the free C++ Builder 5.5. Unpack to C:. Then I read the “readme.txt” file. I gives some horribly unintelligible message about changing file extensions in the “bin” file. WTF ?

I am usually okay at installing hardware / software, but this time I am failing miserably.

Anyway - I’m now 1 week behind in my lectures because I cannot do the excercises that the prof. sets for the weekend.

SOMEONE PLEASE HELP !!!

Bump. Pleeeease. Anyone ???

C is simply a subset of C++. This means that any C++ compiler should be able to compile C just fine.

You should be able to leave the file extension as cpp and compile any C program in the same way you would a C++ program.
If you keep to the C subset of C++, your program will compile on any pure C compiler as well.

So it sounds like you’re using a multiple-document Windows IDE to write your code in. That’s fine. I think it might be similar to Microsoft’s Visual C++ (I only ever used the DOS version of the Borland compiler). Do you have to create a “project” first, then write and save your .c or .cpp files in the project? In Visual C++, as far as I know, you can’t just open it up, type out some code, and compile it (actually, I just tried it and you can, but it prompts you to create a “project workspace”).

Have you read any of the documentation? Asked your professor?

Strictly speaking, this is not true. Two of the differences I remember offhand are the data type of character constants (int in C, char in C++) and the precedence of the ? (conditional) operator.
To the OP: I´m not really familiar with Borland C++, but I think you should create a console project (File->New->Console Wizard or something like that). That creates an application that runs in a dos box, and the entry point is the main() function, just like “normal” C compiler.

I´m afraid I can´t help you with your linker problems.

Thanks guys. I’ll give it another bash…