can any1 pls tell me how can i solve my problem?
i'm running a c program that required the user to key in a int, but instead of keying in int the user key in char... and somehow the program stor the char n turn it into int...
some even continue looping... how can i solve it... demanding for help...
blur blur
0
Newbie Poster
Recommended Answers
Jump to Postchar is in fact a (very small) integer type. To convert the string of char to int, use atoi() or something similar.
Jump to PostYou must first read in your text book how to code in C. This is not a good place to learn the very most basic things, but a place to come if you have written a program that is not working right, or maybe does not compile.
All 6 Replies
griswolf
304
Veteran Poster
blur blur
0
Newbie Poster
griswolf
304
Veteran Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
blur blur
0
Newbie Poster
thekashyap
193
Practically a Posting Shark
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.