Can't edit so I'll just leave my solution here:
I can't work out how to pass the address properly through to the display function, so I will just use the return as a NULL check. It will be as...
Type: Posts; User: MedicineMan25
Can't edit so I'll just leave my solution here:
I can't work out how to pass the address properly through to the display function, so I will just use the return as a NULL check. It will be as...
Hey there guys,
I am having a little trouble with implementing an aspect of searching an address book, in a little make-a-phone project, I'm working on.
Basically I am trying to search through...
Legend. I also realised that I'm an idiot and was indexing from 1 instead of 0... doiii
Hey guys,
I'm just testing some code via user input. I'm trying to do a simple user input to select from 3 options, then enter a name to be entered into a linked list. I was using scanf but have...
So you did.. thanks! :)
oh... well that's boring... I'll have to keep digging and see what I find.
Thanks everyone![/COLOR]
Yeh well I need to know. I am a curious cat. I don't care about the API, I know how to use it... I'm not just asking so that I can use this in a code-base, I'm asking because I want to gain an...
Sorry, been on a show last few days.
[/COLOR]
Um, sort of: I now understand what an opaque data type is and why it's used (really frustrating to learn that's a thing... grrrr). Wish I'd known...
Hey guys,
I am trying to understand the file struct in C.
How does this extend into a fully fledged file with
formats and the rest.
All there seems to be is an int that, unless this was a ...
Oooo yes of course.
Good point, strlen doesn't count the null.
Thanks!!
MM25
So I thought I would write a little simulation, to better understand the syntax and process that's happening here.
typedef struct{
char data[25];
oh ........ I did it again.
"Paste as text"
Got it.
Oops!! Didn't see that. Will do.
Yes I understand that macros are simple text replacement. And I understand that the dot operator and arrow operator are essentially the same. As mentioned the...
So I’m a little confused with this code I am wading through. It’s the CMSIS level for the 32-bit zero gecko from Silabs.
Basically they have a series of defines, for the base address of each...
That's actually really cool, I never really thought about it that way.
Here is the revised code:
/*
* To change this license header, choose License Headers in Project Properties.
* To...
So your saying that I should be storing a value as the recursion occurs, then pass that value back through as a parameter of the function...
haha, yes that is certainly true...
Well I want to eventually return a value from the function. All return values up until that point, made recursively, are just garbage. But I see your point,...
It seems to be segfaulting no matter what. However this way:
printf("This is the check left function executing\n");
if(*left_ptr == INT_MIN){
printf("else cond. in...
I don't understand that to be a problem. It's quite common to ignore a return value is it not? Is there another way that I could recursively call a function, that eventually returns a value?
Here...
Oops, I seem to have generated a seg fault. Damnit.
Thanks anyway!
Nope... INT_MIN was definitely the problem... weird...
Holy ........ Salem. I can't believe I didn't see that. Thanks.
I'll try using the INT_MIN keyword in the conditional now and see if my over-iteration was the problem.
Found the problem... at least for now... INT_MIN was not equal to the value within the array. Even though it was initialized as that value, for some reason I needed to explicitly put the value of...
Hey guys,
I am getting weird behaviour from a deque experiment I wrote. It's not even that significant; it's a comparison operator.
Please just focus on the mentioned bug, this is incomplete...
ah yes.. now I understand why there is wchar_t and other such typedef names. I will utilise your tip of extending this convention to structs and other types. Thanks!!!
Ok, so I figured all of my mess out. I did a silly.
typedef struct{
}blank;
Like you said; this declares blank as an instance of 'something that wasn't defined', type 'struct'. I...