~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Lame excuses are never excused.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

banner

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

tang

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Opera phantom PRIESTS are reading through inverted bibles, righteously.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

coloring -> dye

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Oh come on, give him a break. After all he is way younger than those who think that those questions are stupid...

But agreed, they are easy ones. I have seen worse... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Watching TV is kind of a time killer. I agree with Infarction, even I don't seem to be needing the Idiot box... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

plentiful -> excess

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Opera phantom demons are READING through inverted bibles, hopelessly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thought is the result of thinking process.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It really is

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

stinger

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

arrogant when gaining

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why try to reinvent the wheel when you can do something like....

int main ( )
{
    using namespace std ;

    string my ;
    const char* const valid_char = "01" ;
    bool valid = true ;

    cout << "Please enter a string: " ;
    cin >> my ;
    getchar( ) ;

    if( my.length() == 0 || 
                my.find_first_not_of( valid_char ) != string::npos)
    {
        valid = false ;
    }

    if( valid )
        cout << "Ready for conversion..." ;
    else
        cout << "Please enter a binary number.." ;

    getchar( ) ;
    return 0 ;
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You are getting incorrect output since you fail to reset the attempts value to 5 again i.e. at the end of the nested do while loop, set the value of attempts again to 5.

Also it is better to decrement the value of attempts at the end of the second do while loop, only after the successful completion of the loop since you seem to be using continue.

And btw, read this thread for getting a good IDE.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

vegetable -> nutritious

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Success and failure are a part and parcel of human life.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This would be more than enough to get you started..

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Except that the statement isn't in the least bit portable...

Much better alternative:

cin.get();

That not being the point since the code is already using Windows specific functions (windows.h).

A good reason not to write system("pause") would be because it spawns a seperate process and troubles the OS since its a system level function. Why incur such overhead when the same can be done with getchar( ) .

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Opera phantom browsers are calculating through inverted PAGES, hastily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

but when extended

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

food -> dessert

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

become mature and

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Built by the Egyptian pharoah's, the pyramid sure is a magnificent structure.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

spiral

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Either using :

const char* ptr = param ;
// or
char* ptr = const_cast<char*> (param) ;

But it would be interesting to know what you are trying to achieve here.....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It seems that you have declared searchnum as a C style string or a null terminated string. If you want to compare C style strings, you can't do it using the not equal to operator. You need to use the function [search]strcmp[/search] function which returns 0 when the two strings passed are equal.

Better yet, use C++ string class, accept the string using [search]getline[/search] and then use the != operator which is overloaded for the sake of effortless string comparision.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hey there buddy, welcome to Daniweb.. :D

Oh and btw, happy debugging... ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hello there, welcome to Daniweb... :D

Oh and btw, did you say assembly...*shudders* ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Post your code so that we can atleast point out the mistakes you are making...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your last for loop is off by one -- running from 0 to 10 where it should have gone from 0 to 9.

As far as sorting is concerned, something like this might be worth reading to see if it serves your purpose....

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

sacred

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

as a total

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

spore

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Arghh... *headache* ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

was down the

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

myrrh -> myth

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

OPERA phantom processors are calculating through inverted fractions hastily.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Him ? No, I would never consider making him the project manager.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

shank

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Haha Just expressing my feelings that's all

Different forums exist for a reason....

Thread moved to the Software developers' Lounge.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Is S.O.S. supposed to stand for something? Like Save Our Sanjay?

No, it goes something like Sanjay Our Saviour...:cheesy:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

hunt

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Well I am just a simple man with simple needs, who believes in making a difference whereever he can.

As far as selecting an option is concerned...*hmm*

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Show some effort on your part by pasting the code you have so far got here...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Long-winded police are sleeping with heartless LEISURE, knowingly.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

shunt

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

try out something

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

the same thing

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

human -> humanity