solved.
Type: Posts; User: jsuite
solved.
I'm trying to learn how to sort a linked list alphabetically using strcmp. Does anyone have any resources / a skeleton of how to do it?
Thanks.
The if(pos==1)
*do this*
portion works. I just can't get the second half to work.
I cannot figure out for this function for the life of me, can anyone help, please?
my struct
typedef struct items item_t;
struct items
{
char name[32];
float cost, weight;
TBH a switch / case in this instance is so simple and rudimentary it's hardly more work to copy / paste someone's answer from here than to just look at a tutorial and do it. But if you want a shot at...
Nevermind, I'm using fgets. Still having some minor problems with the print out loop and the read through file loop both of which pertain to the full file not being printed out line by line....
How do you use fscanf when there's a space in the string?
I'm sorry im at school right now and the connection went out. Ok so I understand how to assign things to the nodes, but how do I read properly from the file and store it?
For starters, I use...
Ok here's a good question. So this is the tutorial on this site for traversing a linked list:
#include <stdio.h>
#include <stdlib.h>struct node { int x; struct node *next;};int main(){ /*...
Well you answered the question by posting some resources, so thank you. And I don't understand storing things into linked lists as a whole. While I got it to work, I hardly understand. I guess to be...
I literally can't find any resources. The only thing I can find is people post there codes only, with help that is inconclusive regarding the functionality of the code. I'm looking for an efficient,...
Just a quick question. I recently finished an assignment regarding reading from a file and storing it into a linked list. I got it to work, but don't really understand the theory behind it, so the...
One thing that I think you're not understanding - could be wrong, is this:
If you say define a variable as char, and then assign it a number, like this:
char num = 26; then if I'm not mistaken...
There's no need for the second void instruction() function.
No worries, yeah when I was going to post to offer "help" I realized the only thing to do was just point it out. Haha!
printf("The square of the distance between (%lf,%lf) and (%lf,%lf) is %lf", x1, y1, x2, y2,z);
look at the end of this statement, bold text is what you're missing!
Aka is this school work!^^^ also I reccommend mallock(sizeof())
Oh is this that new game you were talking about adak? haha...
Besides that, your if statement isn't doing anything. There's no way weight == lb and height == ft if there's no sort of pre-existing conditions over the ft and lb variables. To start, they aren't...
Holy balls. After you type a sentence and put a period, you make a space. Take my syntax as an example. Seriously, that was painful as hell to read.
No I meant tomorrow, I already turned in the assignment a while ago out of frustration. Couldn't get out of an infinite loop, something was wrong with the while loop in ThrowDarts. So I'm not asking...
Just PM it to me if you don't mind. :D
tl;dr make a thread for help with class. Another student copies and pastes my code, makes it work for them, and tells me they linked prof to thread?
and then says to contact them for tutoring -_-
Unfortunately I can't use this because you're in my class. :(
To actually copy the file, go to the path (as in go to my computer) and navigate to the file.