Search:

Type: Posts; User: dnysveen

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. I did read the thread and didn't see anything...

    I did read the thread and didn't see anything about non 8 bit bytes.
  2. sizeof returns the number of bytes and there are...

    sizeof returns the number of bytes and there are always 8bits to a byte.
  3. I should have multiplied by 8 and not 4, my fault.

    I should have multiplied by 8 and not 4, my fault.
  4. I came up with another solution to the original...

    I came up with another solution to the original question. Does anybody see anything wrong with my solution?


    int countBits(int x){
    int numBits=0;
    int intSize=sizeof(int)*4;
    for(int...
  5. I already know all about hex and binary just not...

    I already know all about hex and binary just not what the syntax of the operators are.
  6. THanks for your replies. Can somebody give me a...

    THanks for your replies. Can somebody give me a link of an explenation of &0xf and &0x1? Are there other &0x commands? Does &0x1 give you the first bit? I was never taught any bit manipulation in...
  7. I get the shiffting and nibble part now but I...

    I get the shiffting and nibble part now but I don't understand the table. Why does the table have these values.

    Edit
    Never mind got it. So when the say count the number of bit it means count...
  8. Thanks but nobody really explained to me whats...

    Thanks but nobody really explained to me whats going on. I don't understand the code or what the &0xf and >> are doing. Thanks
  9. Please Explain Count the number of bits in an int code

    I am studying for an interview and I came across an interview that asks to count the number of bits in an int. I have the solution but I do not uderstand either solution. Woul somebody please...
  10. Replies
    12
    Views
    3,488

    Still did not answer my question on why the...

    Still did not answer my question on why the devlopers did this. What was there rational? It seems stupid. Its like have multiple ifs and if one if is meet it executes the rest of the if statements...
  11. Replies
    12
    Views
    3,488

    Why on Earth would the designers of C++ just go...

    Why on Earth would the designers of C++ just go on to ignore the rest of the case conditions? That is about the same as ignoring in an if else statement. What was there reasoning behind this? Am I...
  12. Replies
    12
    Views
    3,488

    Switch Case Question

    I was doing the quiz on this website dealing with Switch Case and I have a question. Question 4 states


    4. What is the result of the following code?

    x=0;

    switch(x)

    {
  13. Replies
    13
    Views
    2,216

    Thanks will read tonight. BTW how often are...

    Thanks will read tonight.

    BTW how often are VA function used and how useful are they? In all my C++ classes in college this has never been mentioned. I'm trying to learn some things on my own.
  14. Replies
    13
    Views
    2,216

    That is why I was trying to use. I'm really...

    That is why I was trying to use. I'm really confused now. Could you please explain this part. Why is fmt a pointer and how does the while loop know when to end? Thanks


    while (*fmt)
    ...
  15. Replies
    13
    Views
    2,216

    I was just using printf() as an example. This is...

    I was just using printf() as an example. This is still a C++ question. Please move back to the C++ forum.
  16. Replies
    13
    Views
    2,216

    Variable Argument functions

    I have a question about Variable size argument functions. When using printf() a variable argument size function you do not need to give the number of arguments in the function call but when creating...
  17. Replies
    1
    Views
    1,363

    Vector Image Enlarge

    I'm trying to get better at C++ so I have been doing some of the challenges at topcoder.

    This was the problem

    Given an image as a vector <string>, scale it up by factor. That is, if the...
  18. Replies
    3
    Views
    804

    Good point. I missed that one. Even if he was...

    Good point. I missed that one. Even if he was reading from the file he would not have a linked list.

    You also do not have a head pointer for your linked list.
  19. Replies
    3
    Views
    804

    Im not exactly sure what you are trying to do but...

    Im not exactly sure what you are trying to do but if you are trying to create a linked list you need to allocated new memory every time you read in a new record and have the previous record link to...
  20. Replies
    7
    Views
    19,434

    What do you mean it would be surrendering?

    What do you mean it would be surrendering?
  21. Replies
    7
    Views
    19,434

    Why don't you just make the priority inverse ie...

    Why don't you just make the priority inverse ie 1/priority val.
  22. Replies
    12
    Views
    4,732

    Don't listen to those guys about the weakness. ...

    Don't listen to those guys about the weakness. If you go the site I gave you they actually interview the people who do the Microsoft interview and they won't to know your weakness. The interviews...
  23. If you used a char array you could use the atoi...

    If you used a char array you could use the atoi function which converts character numbers to integer values. I think there would be less overhead subtracting 48 or '0' because you are not making a...
  24. I figured he knew how to end his main function. ...

    I figured he knew how to end his main function. Geeez people

    Zuk I understand. I always like to have everything optimized and working the best way. I knew really thought of using -'0' but I do...
  25. Good point. Small oversight when writing the...

    Good point. Small oversight when writing the code in under 5 minutes. I wasn't looking to make sure it was "perfect" just that it ran. It was something just to give him and idea.
Results 1 to 25 of 38
Page 1 of 2 1 2