Lame excuses are never excused.
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Lame excuses are never excused.
banner
tang
Opera phantom PRIESTS are reading through inverted bibles, righteously.
coloring -> dye
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... ;)
Watching TV is kind of a time killer. I agree with Infarction, even I don't seem to be needing the Idiot box... ;)
plentiful -> excess
Opera phantom demons are READING through inverted bibles, hopelessly.
Thought is the result of thinking process.
It really is
stinger
arrogant when gaining
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 ;
}
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.
vegetable -> nutritious
Success and failure are a part and parcel of human life.
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( )
.
Opera phantom browsers are calculating through inverted PAGES, hastily.
but when extended
food -> dessert
become mature and
Built by the Egyptian pharoah's, the pyramid sure is a magnificent structure.
spiral
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.....
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.
Hey there buddy, welcome to Daniweb.. :D
Oh and btw, happy debugging... ;)
Hello there, welcome to Daniweb... :D
Oh and btw, did you say assembly...*shudders* ;)
Post your code so that we can atleast point out the mistakes you are making...
sacred
as a total
spore
Arghh... *headache* ;)
was down the
myrrh -> myth
OPERA phantom processors are calculating through inverted fractions hastily.
Him ? No, I would never consider making him the project manager.
shank
Haha Just expressing my feelings that's all
Different forums exist for a reason....
Thread moved to the Software developers' Lounge.
Is S.O.S. supposed to stand for something? Like Save Our Sanjay?
No, it goes something like Sanjay Our Saviour...:cheesy:
hunt
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*
Show some effort on your part by pasting the code you have so far got here...
Long-winded police are sleeping with heartless LEISURE, knowingly.
shunt
try out something
the same thing
human -> humanity