-
couting unwanted garbage
I'm not sure why but both my functions are couting garbage on certain elements for only a temporary period of time. I can't figure it out. Is it the way I am initializing the vectors? It is happening in both my functions but not in a similar third function (not shown)... Any ideas?
CODE: http://pastebin.com/d1483aeeb
-
Perhaps
default : hexadecimal.push_back( charRemainder + '0' );
Also, the while loop should continue until number is zero
-
CODE: http://pastebin.com/d425b7541
I've uploaded all my code and commented on the lines where garbage is coming out.
It didn't seem to help when added + '0' to the switch statement. Maybe if someone can run the code they will be able to see the issue better...
-
I'd prefer the code here personally.
pastebin (and similar) delete code after a time period.
That maybe nice for you, but this thread wouldn't make any sense after your code has gone.
-
error was found finally in this statement:
Code:
cout<<"0x "<<hexadecimal[1]<<" "<<hexadecimal[0]<<cout<<"\t";