I looked and read aobut typedef in the c book aren't this the same? I am just asking a question no need to complex answers, straight questions deserves straight answer .
Type: Posts; User: kyel_dai92
I looked and read aobut typedef in the c book aren't this the same? I am just asking a question no need to complex answers, straight questions deserves straight answer .
but how about my last question? D:
canI request thread closure? I am gonna try to retweak my code but before that
is typedef StackNode *StackNodePtr the same as struck stackNode *StackNodePtr ??
wait I think I get typedef StackNode *StackNodePtr; will be struct stackNode *StackNodePtr ? am I correct?
I've redone my code now look at the errors I really don't get it with this errors can...
I am using a bloodshed C++
btw before i forget can anyone translate this without typedef?
newPtr = malloc(sizeof (StackNode)); this one :|
I was on a middle on making my code then I encountered this
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
struct stackNode
{
and what's the solution for typedef StackNode *StackNodeptr?
OMG I am confuse , soo they are not the same? well the they have the same concept but , anyways I'll put my whole coede here I guess? just to make it more understandable
This is the original...
just a question
struct stackNode
{
int data;
struct stackNode *nxt
}
typedef struct stackNode StackNode;
typedef StackNode *StackNodePtr;
I am just asking a question if you are not gonna say something good don't say it.
can we just stay in topic here for peeps sake , I am just asking a question
I just need clarification, I understand it already, I just need clarifications though.
it's a pointer
void add(struct node **root, int x)
{
struct node *conductor;
if(*root==NULL)
{
(*root)=malloc(sizeof(struct node));
(*root)->value=x;
...
SO i've decided to change my code to pass by reference due to my curiosity soo here it is but the problem is it's not working it doesn't print anything again
#include<stdio.h>...
sorry :(. can we just stay in topic here?
if we are wrong, point it out on the code
quzah, stop posting if you are not going to reply in a appropriate manner in this thread.
I didn't make a temporary pointer :|
Now the only thing I need to worry about are removing nodes how do I actually remove a node? do i need to make another function for? it? any suggestions?
Thank you :) at least someone here is encouraging me but hey I did :) thanks to everyone who helped me all I have to do is remove the node
after those constructive crictscism I was finally able to do it
Here's my new code, it adds a new node, the only problem is that how should I add the value of 5 and 3 ?? and the displaying but it looks like everything is going well
#include<stdio.h>...
why is that?
wait nevermind what I posted about printing xD.
yes the first node in the whole linked list XD. if you don't mind can you provide me a sample of a program that has 2 nodes and has values in it? so...