i am making a number base conversion program in c++,

suppose that user enters an base 2 number and want to convert that number in base 4. when he enter the number (which he wants to be converted), how can i detect that number is belongs to base 2 number system or not.

for example: if user enter 1001011001 , program should continue and convert that number to base 4. and if user enter 1200101 or 1001012 , program should not convert that number and output that this number is not belongs to base 2 number system. waiting for your kind reply. thanks.

kamalashraf 0 Newbie Poster

NathanOliver 429 Veteran Poster Featured Poster

kamalashraf 0 Newbie Poster

deceptikon 1,790 Code Sniper Team Colleague Featured Poster

kamalashraf 0 Newbie Poster

Moschops 683 Practically a Master Poster Featured Poster

Banfa 597 Posting Pro Featured 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.