Search:

Type: Posts; User: husoski

Search: Search took 0.01 seconds.

  1. It's a matter of definition. The preprocessor...

    It's a matter of definition.

    The preprocessor is conceptually a separate process run before the compile. Its job is to make changes to the source code before passing it to the compiler. It looks...
  2. The pattern being repeated there is alternation...

    The pattern being repeated there is alternation of * and / throughout the computation (read the note), so that expression isn't quite it. If x is an even integer, then the result is:


    y = ...
  3. Yes, use a loop. What else could you use? You...

    Yes, use a loop. What else could you use?

    You have a variable number of factors to multiply or divide in that expression, with no fixed upper limit on the number of (x-k) factors, and if/else and...
  4. You didn't say what the problem is, but it's...

    You didn't say what the problem is, but it's clear that your code won't even compile. The structure tag "StudentData" is not defined anywhere. Before your first use (I usually put type definitions...
  5. Replies
    4
    Views
    1,122

    "ASCII numbers" are just numbers. The only time...

    "ASCII numbers" are just numbers. The only time the "ASCII" part matters is when you're interpreting that number as a character.

    In C, a char or unsigned char value is just a number. What...
  6. You forgot the argument list on that function...

    You forgot the argument list on that function call. Change line 157 to:


    if (!checkBoardFull(board))

    That should get you farther along in your testing.

    PS: The reason for...
  7. Replies
    6
    Views
    1,054

    You might want to fix your question. Even after...

    You might want to fix your question. Even after fixing the declaration of main (must be "int main()" in standard C), the variable j is not declared; and you have a variable t that's not used...
  8. Replies
    16
    Views
    2,086

    Then the only thing left is to multiply or divide...

    Then the only thing left is to multiply or divide by 2 until you get a number 0.5 < |x| <= 1.0, starting with the bias as the count value and adding or subtracting 1 from that count on each...
  9. Replies
    8
    Views
    1,384

    Not quite. The statement in C/C++ is also called...

    Not quite. The statement in C/C++ is also called "goto", but in lower case.


    if (x < 5) goto SKIP;
    std::cout << "Didn't skip." << std::endl;
    SKIP: ; // label on an empty statement

    ...
  10. Replies
    15
    Views
    2,164

    Thanks and yes...I forgot to mention that...

    Thanks and yes...I forgot to mention that <float.h> and <stdlib.h> are needed.

    It's not bad for pure-standard C. You can expand on the conditional compilation ideas to include a wider range of...
  11. Replies
    15
    Views
    2,164

    If you're worried about platform-specific...

    If you're worried about platform-specific problems, one thing to avoid is rand(). Microsoft's implementation is seriously deficient, and their run-time library is used by the various MinGW ports of...
  12. Replies
    7
    Views
    1,639

    It's already been "pointed" out that the two...

    It's already been "pointed" out that the two examples are not equivalent. But you can initialize a pointer variable using a typecast integer value.

    That second example only makes sense if the...
Results 1 to 12 of 13