You might need to add a boolean flag to keep track of whether the variable has been initialized.
Type: Posts; User: sirjis
You might need to add a boolean flag to keep track of whether the variable has been initialized.
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...
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...
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...
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...
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...
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,...
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...
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...
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...
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,...
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...