morning everyone.
i hope someone out there could really help me.
im trying to store large numbers. as i need to complete my work under Dev-c++ environment but im not familiar with it as i just started using it recently.
the following is my initial coding for my work.
/*This is a program to calculate large numbers.*/
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "Stack2.cpp"
#include "Draft2.h"
using namespace std;
int atoi(const char *number2);
int main()
{
string number1,number2,num;
int i,j,x;
int length;
int comma=0;
int Digit=0;
int value;
cout << "Enter integer: ";
cin>>number1;
length=number1.length();
cout<<"Total digit: "<<length<<endl;
number2=number1;
x=0;
while (number2[x]!='\0')
{
//if (isdigit(number2[x]))
{value=atoi(number2[x]);
cout<<value<<endl;}
x++;
}
system ("PAUSE");
return 0;
}
int atoi(const char *number2)
{
int value1;
value1=atoi(number2);
return value1;
}
after i compile using Dev-C++, it shows this error description:
invalid conversion from 'char' to 'const char*'
initializing argument 1 of 'int atoi(const char*)'
i've tried all ways to modify my coding but i just cant get it.
really would be happy if someone could help me.
hope to receives some replies as soon as possible.thank you.