iam trying to extract a individual character. for example, during run time the user enters 110111 as input. can any 1 help me with the code to extract these input and store them in an array as individual elements.
haven_u 0
Light Poster
Recommended Answers
Jump to PostIf it's an std::string, do mystr.c_str() to get a character array, to access an individual character, do mystr[[B]charIndex[/B]]. This is all over the web, try searching first.
Jump to PostAre you entering them into an integer instead of character array? Yes, then use a series of % and / operators.
All 5 Replies
William Hemsworth 1,339
Posting Virtuoso
Ancient Dragon 5,243
Achieved Level 70 Team Colleague Featured Poster
Zjarek 2
Junior Poster in Training
RunTimeError 0
Junior Poster in Training
haven_u 0
Light Poster
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.