string to double

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

calculus87

Thread Starter
Joined
Sep 4, 2003
Messages
34
Hello,
Okay, I have another question for yall. I am having a little problem going from double to string.

I am currently saving to a text file then reading it back, but I don't line this away at all. Could you show me an easier way please.

Okay thanks for the help.
~Ronald
 
Joined
Nov 22, 2002
Messages
186
well i made that while programming for an SMSC but that was in Visual Basic. If you want, i can provide you both way examples but not in c++.

cassamine
 
Joined
Apr 30, 2001
Messages
2,636
This might help
Code:
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int x, y;
char *string;
int length = 6;
double val = 24.62941;
string = ecvt(val,length,&x,&y);
printf("%s ",string);
cout<<"Decimal Point Is "<<x<<" Places Over"<<endl;
system("pause");
}
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top