Search:

Type: Posts; User: sirjis

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,135

    You might need to add a boolean flag to keep...

    You might need to add a boolean flag to keep track of whether the variable has been initialized.
  2. Replies
    4
    Views
    2,002

    This board is intended for questions about the C...

    This board is intended for questions about the C language and standard libraries, typically not low level questions regarding the hardware of different microcontrollers. You may want to ask your...
  3. Replies
    5
    Views
    1,086

    You should free exactly what you allocated with...

    You should free exactly what you allocated with malloc. If you allocated the whole structure in one call to malloc, you should free it with one call to free.

    Any pointers in the structure which...
  4. I had no idea what you were talking about,...

    I had no idea what you were talking about, either. I found this page:
    http://www.cs.nyu.edu/courses/spring00/V22.0480-002/class07.html
    which indicates that these "unions" are unrelated to c...
  5. Replies
    2
    Views
    898

    If you choose to use strtok, you will be able to...

    If you choose to use strtok, you will be able to extract the words one by one. You'll want to keep track of the number of characters used up on the current line, and if that would be greater than...
  6. Replies
    7
    Views
    1,098

    You need to compile the my.c file before an...

    You need to compile the my.c file before an executable can be created. The compiler will automatically search for the .h files you specify in #include, but it will not automatically compile the .c...
  7. Replies
    7
    Views
    9,484

    Do you mean that you're just printing out the...

    Do you mean that you're just printing out the value once, and you want it to continually update, or do you actually want a graphical display?

    If you just want to make the console output update,...
  8. Replies
    2
    Views
    3,432

    It doesn't have to be done with an external...

    It doesn't have to be done with an external header if you just want to draw (extended) ASCII borders. Check out the different border pieces available near the bottom of Ascii Table. You can just do...
  9. Replies
    1
    Views
    5,489

    You can use the dot product...

    You can use the dot product to get the angle between two vectors (vector1 is point2 - point1, and vector2 is point3 - point1). The link provided gives the formula for the angle. Just check the...
  10. Replies
    4
    Views
    11,692

    You probably can't just look at the values of the...

    You probably can't just look at the values of the endpoints. Consider

    f(x) = x^2 - 3,

    with A = -2 and B = 2.

    Then f(A) = 1 and f(B) = 1. However, even though they have the same sign, there...
  11. Replies
    4
    Views
    2,323

    Thanks for your reply. Unfortunately, it does...

    Thanks for your reply. Unfortunately, it does not quite work in this situation. I am actually not trying to output to a file. I just want to be able to look at each character (or string,...
  12. Replies
    4
    Views
    2,323

    "Spying" on cout

    I've been trying to figure out how to redirect and split cout so that I can inspect it. Basically, there is some code that already uses cout that I do not want to modify, but I want to be able to...
Results 1 to 12 of 12