473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

need some conversion from turbo c++ to visual c++

can you guyz pls tell me what would be the command of "linerel", "cos", "sin" of turbo c++ could be converted to visual c++ .??
Nov 7 '06 #1
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
Nov 8 '06 #2
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);
}
}
Nov 11 '06 #3
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.
Nov 11 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
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,...
70
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()...
0
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:...
10
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...
4
by: bibin | last post by:
Can somebody send me the math.h header file used in Turbo C
18
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:...
16
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.
4
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"?
3
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
0
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...
1
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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....
0
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
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.