hello all, im having some trouble trying to figure out the problem and why this program is not working correctly. I have two linklists built from two infiles. Some of the names in my first list are...
Type: Posts; User: killmequick
hello all, im having some trouble trying to figure out the problem and why this program is not working correctly. I have two linklists built from two infiles. Some of the names in my first list are...
okay..so basically what i have is two linked lists(link1, link2) and link2 contains all of the values stored in link1. What i need to do is use string compare to clean the big list free of everything...
nvm i got that fixed but i must have an error in my building of the list because when i return top and print the list only the last thing in the infile prints.
i then get an error on line 44 saying stream != NULL
Here is my error.. any clues?
http://i20.photobucket.com/albums/b221/xkillm3quickx/Untitled-1.jpg
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
but i could pass the two different infiles in..got it. but say i wanted to use string compare to remove copied names out of one list that are in the other..is there any special approach to that or...
kk so i have it to build my list, quick question(if i do all the same things to build a separate list can i return two values under two different names(ie: return(top, top2)
so the call would be something similiar to:
result = build_list(top) ??
so using that case how would i call the function
well with the fixed corrections im only getting one error at the return saying i cannot convert from an info_node* to int..
int build_list(struct info_node* pnode)
{
FILE* infile ;
struct...
well so far this is the addition ive made im just using test code to see if i can get it to print out before i implement my official list. Can someone give me a hint as to how i can return the value...
so basically just shove this into my function and that works?
struct info_node
{
char fname[20] ;
char lname[20] ;
int rank ;
float score ;
struct info_node * next ;
} ;
right. i get the idea but how am i supposed to build the list if i dont have a pointer to the structure?
im still having trouble understanding how to get this function to work properly, so instead of passing a pointer to a pointer i can remove the struct info node pointer, build the list and return a...
so basically send a pointer to malloc from main into my function and work from there? Will the infile scan work inside of the function if i do that?
kk i think i get what you mean there but lets say i declare the FILE* infile inside of my function would that still be a problem?
hello im having some trouble in my function call here.. what i am trying to accomplish is to build a linked list in a function and send the link back to main. Can anyone sort out my problem?(i think...
haha sorry master, the code works well but i would rather learn then copy and paste :D.
tabstop..do you think i should be including getting the block of memory and the scanning of the infile inside this function?
nothing.. i need it to be in a function though
hello..i was wondering if anyone could take a look at my code which makes two linked lists from infiles. the lists work fine as i have tested printing them out i just need help to make a function...
well specifically the errors are:
Warning 1 warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE....
hello im pretty sure im on the right track but i get errors in my code that cannot convert strings op1 and op2 and such can anyone help?
# include <stdio.h>
# include <stdlib.h>
# include...
well i thank you i understand what is going on..but one more question. how can i modify my stack to work with integers
i understand the logic and how postfix expressions in the stack work..its translating that to code is what im having trouble with