can you guyz pls tell me what would be the command of "linerel", "cos", "sin" of turbo c++ could be converted to visual c++ .??
3 3175
As far as I understand ur problem u want ur program to run under VC++ environment. So I don't think there is any problem with that u can just copy that program of turboo C++ to VC++ editor. I am giving u a sample code
Example
/* SINCOS.C: This program displays the sine, hyperbolic
* sine, cosine, and hyperbolic cosine of pi / 2.
*/
#include <math.h>
#include <stdio.h>
void main( void )
{
double pi = 3.1415926535;
double x, y;
x = pi / 2;
y = sin( x );
printf( "sin( %f ) = %f\n", x, y );
y = sinh( x );
printf( "sinh( %f ) = %f\n",x, y );
y = cos( x );
printf( "cos( %f ) = %f\n", x, y );
y = cosh( x );
printf( "cosh( %f ) = %f\n",x, y );
}
Output
sin( 1.570796 ) = 1.000000
sinh( 1.570796 ) = 2.301299
cos( 1.570796 ) = 0.000000
cosh( 1.570796 ) = 2.509178
Please help:
As long as I have completed the program to draw a koch snowflake curve in Visual C++ i am having an error : 'linerel' : undeclared identifier
Error executing cl.exe.. can you tell me how can i run this program. Thats the only problem when i was trying to convert this program from turbo C++ to Visual C++ .
#include <stdlib.h>
#include<math.h>
class recursivecurve{
public:
recursivecurve(){angle=0.0;}
void readinitvalues();
void snowflake();
private:
double side, angle;
int level;
void right(double x){angle += x;}
void left(double x){angle -= x;}
void drawfourlines(double side, int level);
};
void recursivecurve::drawfourlines(double side, int level)
{
if (level== 0)
linerel ((cos(angle*3.14/180)*side),
(sin (angle*3.14/180)*side));
else{
drawfourlines(side/3.0, level-1);
left(60);
drawfourlines(side/3.0,level-1);
right(120);
drawfourlines(side/3.0,level-1);
left(60);
drawfourlines(side/3.0,level-1);
}
}
void
recursivecurve::snowflake()
{ int i;
for (i=1;i<=3; i++){
drawfourlines(side,level);
right(120);
}
}
Banfa 9,065
Expert Mod 8TB
linerel is not a standard function and therefore you should not be surprised that it is not in Visual C++, it is clearly a Borland extension.
You will need to understand what this function does and then either find a replacement using Visual C++ extensions or write you own function that does the same thing.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Developwebsites |
last post by:
I am taking advanced C++ at college and we use Borland Turbo C++ 4.5 compiler.
How different is Turbo C++ from the standard C++?
I know Borland used to call their versions of C++ and Pascal Turbo,...
|
by: rahul8143 |
last post by:
hello,
1) First how following program get executed i mean how output is
printed and also why following program gives different output in Turbo
C++ compiler and Visual c++ 6 compiler?
void main()...
|
by: Martin |
last post by:
When I convert a program from VC6 to VC7 I get the
following linker error:
CVTRES : fatal error CVT1100: duplicate resource.
type:STRING, name:1686, language:0x0409
LINK : fatal error LNK1123:...
|
by: arun |
last post by:
I have 3 compilers at home: MSVC++, DEV-C++, and Turbo C++ 3.0.
I would like to know how to make a color of my choice by specifying RGB
values. Perhaps MSVC++, Dev- C++ have their own libraries...
|
by: bibin |
last post by:
Can somebody send me the math.h header file used in Turbo C
|
by: pipito |
last post by:
Hi...i am a beginner in C programming...
my question is like this...
im using the scanf in C to accept input data in output area,
printf("name: ");scanf("%s",name);
printf(Address:...
|
by: scott |
last post by:
I am looking for a copy of Turbo C 1.5 from 1987 for some historical
research I'm doing into computing from that time period.
|
by: Herhor |
last post by:
Recently Borland has been hyping its new line of RADs called "Turbo" as
an ultimate tool for beginning programmers. Are these products really
match for Microsoft's "Visual Studio"?
|
by: postrishi |
last post by:
Hello Everybody , I am a new user. I am currently using Turbo C++ 3.0
editor in my engg.Can you tell me or post me a ebook on turbo c++ and
NOT on c or C++.MInd it I want a book on TURBO C++ editor...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |