hi , im pretty new to computer science and alose to this community . i have a problem that im trying to solve and hope you guys can help me with it . im trying to create my own version of the function "atoi" that can be found in stdlib and i cant get it to work . i know how to convert a single char from the string to and int , but its starting to be a problem when im trying to convert a number like "111" , if any1 can help it could be great . thanks ...
RisTar
0
Junior Poster in Training
Recommended Answers
Jump to PostI assume you have this one function which can convert a single character to a number. Say it is int convert_one_char(const char c).
Given this function here is the code to extend it to convert a string with multiple chars:
int convert_one_char(const char c) { if( …
All 3 Replies
thekashyap
193
Practically a Posting Shark
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
RisTar
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.