hi!i am a engineering student.i am now facing a lot of problem to using the borland c++ solfware.the following is my problems:

  1. how to using borland c++ to draw a Mohr's circle to find principle stress?
  2. how to solve cubic equation.
  3. how to display matrice 3x3 on the screen?

Please post your own effort and then we will see what can be done to help you out. Just asking for a source code file would do you no good and beats the purpose of doing engineering.

thanks for your kind reply.:)
i already try to draw a simple circle as a begining but there is a error detected in my source code. the message said:"#error BGI graphics not supported under Windows"
what it's (BGI) means?
borland c++ cannot drawing graphic object?
what shoud i do to solve the BGI problem?
the following is my source code:

#include <graphics.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define RADIUS 120
void far circle(int x, int y, int radius);
int x,y; //The circle's center
int radius;//The circle's radius
int main(void)
{
int g_driver=DETECT,g_mode,error_code;
int xmid, ymid;
char mess [40];
initgraph(&g_driver,&g_mode,"");
error_code=graphresult();
if (error_code !=gr0k)//error!!
{
printf("\nGraphics error:%s\n",grapherrormsg(error_code));
exit(1);
}
xmid=getmaxx()/2;
ymid=getmaxy()/2;
moveto(xmid,ymid);
sprintf(mess,".(%d,%d)",getx(),gety());
outtextxy(xmid,ymid,mess);
circle(xmid,ymid,RADIUS);
getch();
closegraph();
return0;
}

Is this the whole code?

Is this the whole code?

thanks for reply me.
i am sorry that i am not sure my code is correct or not but i just follow the book i refer. but the error still detected.
i still new in learning borland c++ so i want to start learning to draw a simple circle 1st berfore proceed to draw a mohr's circle.
so can you help me to solve the solution??
thanks.

thanks for reply me.
i am sorry that i am not sure my code is correct or not but i just follow the book i refer. but the error still detected.
i still new in learning borland c++ so i want to start learning to draw a simple circle 1st berfore proceed to draw a mohr's circle.
so can you help me to solve the solution??
thanks.

When I was looking your code you din't have

tags and I didn't copy the graphic.h include. I noticed that some stuff were not defined but probably they are defined in graphic.h. I suggest to moderator to remove the 'solved' thing from thread becouse members think that your ptoblem is solved but it's not. Read this link maybe it will help you.

thank you andor..
1 new question i want to ask.
can java applet window can convert to borland c++?

thank you andor..
1 new question i want to ask.
can java applet window can convert to borland c++?

I dont think i get your question. Please explain it in detail.
Java applets are coded in Java while C++ is a different story altogether.

o..my question is :
any solfware or method can convert java source code to borland c++ source code??

Conceptually and logically you can convert a code written in any language into a code of any other language, obviously there are some exceptions.

And as far as my knowledge is concerned, i dont think there is any software which directly as such converts code written in Java to a code of Borland C++. And btw Borland C++ is as such not a language but an IDE. The language is C++.

Why not just write a code from scratch on your own ? One more question, is it absolutely necessary for you to use a non standard graphics library. If you are intrested why not just try out OpenGL ?

Hope it helped, bye.

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.