Ok screw it. I am gonna go get something to eat. I will be on shortly.
Type: Posts; User: MattW
Ok screw it. I am gonna go get something to eat. I will be on shortly.
Wait... you never have any way for the caller to get the new pointer.
Ok but I am looking at your debugger display pic you attached. What is the dizzle with no 1.0, 2.876 link in the list?
I had never found you to be particularly guilty of such things. I know I am totally guilty of tangents as-are Elysia, laserlight, CornedBee, Mk27, Matus and Thantos. But none of us like totally start...
You are welcome bro.
Is that what you even wanted to do? If so, go for it. Then you don't need to add those other lines. I simply noticed you do not end up capturing the first line of values.
void realloc_or_die(void **p, size_t size)
{
void *tmp = realloc(*p, size);
if(tmp)
{
*p = tmp;
return;
}
free(*p);
Why not just take the number as a string, then flip the string? I think its computationally less complex since theoretically you have it as a string to begin with.
Sure :) Obviously you would need to do some modification to that code since its for Windows structures.
You can add me, I am about to go out to lunch. [email protected]. I was simply stating that sscanf() is going to always crash when you read random characters. By setting line[] = "" you at least...
Those are mathematical expressions. In programming an assignment operator works by setting x to y when x = y. It is not commutative. Which if you think about it makes sense. Wouldn't every line of...
Hmmm I remember seeing this question some time last week. Perhaps doing a forum search would benefit you.
You know that the vertical ticks are every 2 spaces and the horizontal spaces are every 4 spaces and vary by one vertical unit up or down. So why not utilize these facts and write a separate function.
Give that the flop-a-doo. nc = strlen(fulln);
Yeah that is a good way to do it. There is actually an algorithm that is oh so cool for doing this exact thing, but methinks your professor would know it isn't of your design. I find it to be a very...
As it should crash.
char line[101] = "";
Tada :)
I dunno dude, you may wish to consider over allocating if anything. Reallocating data is tricky and slow business. Not to mention you are not even correctly using realloc().
One way of doing this would be to keep track of what months fall on what days of the year. Just be sure to account for leap years.
Ok cool, I see
fgets(line,sizeof(line), input_stream); // Delete this line.
while (((line_ptr=fgets(line,sizeof(line),...
Hmmm wtf happened to line 1? (1.0 2.876) Its not in the list. Lemme look at your code real quick.
I sooooooo have nifty code to do this for you. But it would be wrong of me to do this for you. So I will make a compromise. You try, and I will give you my code.
You are welcome, but I would feel embarassed to say I feel like I helped you while you still have those nasty loops in your code :(
If that is your desired result shouldn't your code be something like
Option 1:
current_measurements_ptr -> next=(struct measurements*)malloc(sizeof(struct...
Thanks for giving me credit, but I would actually say Salem is absolutely right and you should simply change max = maxx-min;
Here is one I found whilst looking for an MFC usage of SetWindowPos().