so, i know im asking a lot, but does this all look conceivable and working to you?
#include<stdlib.h>
#include<stdio.h>
struct SLL {
int val;
struct SLL * next;
Type: Posts; User: needhelpbad
so, i know im asking a lot, but does this all look conceivable and working to you?
#include<stdlib.h>
#include<stdio.h>
struct SLL {
int val;
struct SLL * next;
lol but i'm not even a fraction knowledgeable about this stuff as much as you guys who help me! thats why im just asking you're opinion if you agree! lol :)
my professor is trying to have us do this analytically and not use a compiler to check for our mistakes, so I am basically doing this in notepad and trying to see if i notice anything that would go a...
Alright.. so far I have this which I think is for the most part.. correct.
#include<stdlib.h>
#include<stdio.h>
struct SLL {
int val;
struct SLL * next;
using the list function I already had made a lot more sense than using n, so I changed that.. but im nto really sure how I should go about initializing p.. i thought it was already
...
Sorry, I wasn't kidding when I mentioned I was slow at this.. heh. Hows this look;
// If the node is not the starting or the last one
void delete(int...
Yea I figured the red was going to be able to handle it, but wasn't positive. And with you mentioning that I am missing that from my delete function, are you insinuating that it is such a situation...
so tell me if im understanding this correctly..
first off.. wouldnt the highlighted text kind of be a check for falling off the end of the list?
and secondly, if i am completely wrong, i added...
aside from what ive said above..
how would i throw in the exceptions for empty and repeat nodes?
where is the issue that would cause that to happen in the code?
im not recognizing where n being large would have an issue..
do the last two codings look concievable to anyone?
while waiting for assistance from you actually knowledgeable people.. :P
I decided I would try and make a flat example of how I believe the deletion would work, tell me if this also looks correct...
does that make more sense?
i looked through my notes back and front and couldnt find anything about his struct that he created, seems he just referred to it without really showing it...
so i thought id try and do a fresh...
to be honest, i never really understood what my professor was doing with liData either. But I have no idea what else I would use in place of what its doing, so I supposed I would just use it blindly
I see the missing } you speak of, and that can be fixed easily. but why don't you believe my "for" loop interates at all? am i missing something blatantly obvious?
anyone see issues in this code? im still too new at this..
alright, so heres my coding that ive come up with so far including the insert.. tell me where im completely wrong, since i am sure i am.
#include<stdlib.h>
#include<stdio.h>
struct SLL {
...
ahh my bad, guess i just wasn't paying attention to the terminology, or thinking about it clearly.
ill post what i would think would be the insert function soon
now, im sorry how newb this is right now, but the allocating memory idea sounds a bit out of my league, because im not exactly sure how or what to do to do so..
okay i can do that :)
now, for the functions of search and insert and so on, do i create all new structs, or do i slip the code inside? id assume each action would get its own struct, but not...
what would i do in place of using void main()?
and thank you for the compliments of the sound procedure, the hard part for me is taking it from the procedure to actual code :P that's where I am...
Okay, so, I think I have proper code here for creating the linked list;
#include<stdlib.h>
#include<stdio.h>
struct SLL {
int val;
struct SLL * next;
Hi :)
So I am pretty new with C, but I know a little.. I have been here before and had great help from you guys so I thought I would try it again.
I need to create code for a Sorted Linked List...
Don't get me wrong, that is great work and more than I could ever do, but does that kind of situation where the record isn't in the data but in the transactions come up in the assignment?