| | |
Problem kicking my but!!! can anybody help?
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jan 2007
Posts: 7
Reputation:
Solved Threads: 0
I have this problem that I can't figure out, I can't figure out the line
statement that needs to go in.
Here's the problem
I've look @ ever example and went over the chapter on linked structures / linked list, however I just can't figure it out!!! Help
thanks for your time.
statement that needs to go in.
Here's the problem
c Syntax (Toggle Plain Text)
struct NodeType { int data; NodeType* p; }; NodeType* p; NodeType* q; p = new NodeType; p->data = 18; q = new NodeType; q->data = 32; <-- statement missing here q->link = NULL;
thanks for your time.
Last edited by WaltP; Mar 4th, 2007 at 2:06 pm. Reason: CODE tags mussing, too...
•
•
Join Date: Jan 2007
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
I have this problem that I can't figure out, I can't figure out the line
statement that needs to go in.
Here's the problem
struct NodeType
{
int data;
NodeType* link;
};
NodeType* p;
NodeType* q;
p = new NodeType;
p->data = 18;
q = new NodeType;
q->data = 32;
<-- statement missing here
q->link = NULL;
I've look @ ever example and went over the chapter on linked structures / linked list, however I just can't figure it out!!! Help
thanks for your time.
Last edited by Narue; Mar 3rd, 2007 at 6:44 pm. Reason: Closed the quote tag
•
•
Join Date: Jan 2007
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
>I fix the link part any responses
Um, good for you? You still haven't specified enough of a problem to be solvable. You tell us what the code is supposed to be doing, and we'll tell you why it isn't working. Until then, get used to not having any useful responses.
If I knew then I wouldn't be asking for your help, now would I ?
Buit thanks for looking anyway
>If I knew then I wouldn't be asking for your help, now would I ?
There's a significant difference between knowing the problem and knowing the cause of the problem. Not the least of which being that I'm talking about the former and you're talking about the latter. Do you go to a doctor and just tell him to heal you? Do you go to a mechanic and tell him to fix any problems he finds? No, you go to a doctor when you're injured or ill, and can tell him where it hurts. You go to a mechanic when your car makes a funny noise that you can describe to the mechanic.
I'm the doctor, tell me where it hurts. I'm the mechanic, describe the noise you're hearing. Then I'll use my expertise to help you correct the problem. Now, what part of that are you having trouble understanding?
There's a significant difference between knowing the problem and knowing the cause of the problem. Not the least of which being that I'm talking about the former and you're talking about the latter. Do you go to a doctor and just tell him to heal you? Do you go to a mechanic and tell him to fix any problems he finds? No, you go to a doctor when you're injured or ill, and can tell him where it hurts. You go to a mechanic when your car makes a funny noise that you can describe to the mechanic.
I'm the doctor, tell me where it hurts. I'm the mechanic, describe the noise you're hearing. Then I'll use my expertise to help you correct the problem. Now, what part of that are you having trouble understanding?
I'm here to prove you wrong.
•
•
Join Date: Jan 2007
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
>If I knew then I wouldn't be asking for your help, now would I ?
There's a significant difference between knowing the problem and knowing the cause of the problem. Not the least of which being that I'm talking about the former and you're talking about the latter. Do you go to a doctor and just tell him to heal you? Do you go to a mechanic and tell him to fix any problems he finds? No, you go to a doctor when you're injured or ill, and can tell him where it hurts. You go to a mechanic when your car makes a funny noise that you can describe to the mechanic.
I'm the doctor, tell me where it hurts. I'm the mechanic, describe the noise you're hearing. Then I'll use my expertise to help you correct the problem. Now, what part of that are you having trouble understanding?
again, like I said before, I needed to fill in the missing statement, however, I couldn't figure it out. here is the question that was given to me.
cpp Syntax (Toggle Plain Text)
struct NodeType { int data; NodeType* link; }; NodeType* p; NodeType* q; p = new NodeType; p -> data = 18; q = new NodeType; q -> data = 32; [B]fill in this line of the missing statement.[/B] q-> link = NULL;
Thanks for you r time anyway.
Have a good day!
Last edited by WaltP; Mar 4th, 2007 at 2:09 pm. Reason: CODE tags again....
![]() |
Other Threads in the C++ Forum
- Previous Thread: Is this situation a 'bad' use of the precompiler
- Next Thread: Program- calculate # of days between two days
| Thread Tools | Search this Thread |
api array arrays based binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game generator givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






