R
rainmaker1234
Its very simple in VC++. In the followeing code I have declared a
String, and a double than I am taking the string and converting it into
Double. getch() at the end is only to pause the screen so you can see
the result.
#include <conio.h>
#include <iostream>
using namespace std;
void main ()
{
string S ; //
S = "990123";
double D = double();
D = atoi( S.c_str());
cout << D << " <--- Interger String -----> " <<S.c_str();
getch();
}
String, and a double than I am taking the string and converting it into
Double. getch() at the end is only to pause the screen so you can see
the result.
#include <conio.h>
#include <iostream>
using namespace std;
void main ()
{
string S ; //
S = "990123";
double D = double();
D = atoi( S.c_str());
cout << D << " <--- Interger String -----> " <<S.c_str();
getch();
}