Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,253 members, 7,957,617 topics. Date: Tuesday, 24 September 2024 at 03:53 PM |
Nairaland Forum / Science/Technology / Programming / Help finding the 15/16 complement of a hex number(C++) (3844 Views)
Need Help Finding An Inventory Control And Management Software / Help Finding Python 3 Web Host. Pls / Hex File Help (2) (3) (4)
Help finding the 15/16 complement of a hex number(C++) by skydancer: 5:17pm On Aug 09, 2011 |
Okay, there's this crazy assignment that's been giving me trouble on c++. Find the 15's and 16's complement of a given hex number using comma operator in the for loop. I have tried many methods but none seem to work yet, Anyone? |
Re: Help finding the 15/16 complement of a hex number(C++) by dellnet: 5:40pm On Aug 09, 2011 |
http://www.rwc.uc.edu/koehler/comath/12.html makes any sense? |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 5:58pm On Aug 09, 2011 |
@ OP The link that dell_net posted should be sufficient. Do you still need further assistance? |
Re: Help finding the 15/16 complement of a hex number(C++) by skydancer: 11:00am On Aug 10, 2011 |
The problem is not the method, it's just the 'c++' thing. How to manipulate strings. . . |
Re: Help finding the 15/16 complement of a hex number(C++) by dellnet: 11:20am On Aug 10, 2011 |
anyways here is c++ string |
Re: Help finding the 15/16 complement of a hex number(C++) by skydancer: 3:43pm On Aug 10, 2011 |
Lol, dell_net. I think you are lost on how to go about it too :p |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 4:58pm On Aug 10, 2011 |
Re: Help finding the 15/16 complement of a hex number(C++) by dellnet: 6:12pm On Aug 10, 2011 |
skydancer:I would convert it to base 2 first and then get the result just not sure what you need string for. |
Re: Help finding the 15/16 complement of a hex number(C++) by dellnet: 6:40pm On Aug 10, 2011 |
you did not ask for code but omo is offering so plead with omo to give you. seriously i did not attempt anything in c++ i guess chivalry is dead today |
Re: Help finding the 15/16 complement of a hex number(C++) by skydancer: 7:45pm On Aug 10, 2011 |
omo_to_dun:Why do you say it's not what I want, I'm a damn beginner in c++. Spent 2 hours without coming out with anything meaningful, And have an exam tomorrow, No time to really settle down and read anything. |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 12:43am On Aug 11, 2011 |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 12:48am On Aug 11, 2011 |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 12:49am On Aug 11, 2011 |
|
Re: Help finding the 15/16 complement of a hex number(C++) by skydancer: 9:13pm On Aug 13, 2011 |
@omo_to_dun: Thanks, I really appreciate. Your coding flavour is kinda sweet. I was nearly staring at std::string for 2 mins. But the comments are superb, But isn't the hexto16 supposed to call hex15to16 with the parameter as hextto15? |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 10:44pm On Aug 13, 2011 |
Re: Help finding the 15/16 complement of a hex number(C++) by skydancer: 9:36am On Aug 14, 2011 |
K. SO what's the std:: calls about? Is it faster than adding 'using namespace std;' at the top or is it simply your style? |
Re: Help finding the 15/16 complement of a hex number(C++) by Nobody: 10:03am On Aug 14, 2011 |
(1) (Reply)
Why Programmers Work At Night / Nigerian Programmers Are Great / Python For Mobile Apps Development???
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |