how to check if something exists in a struct linked list?
can someone provide an example of a struct linked list, where it has strings as its values, and then how do I check if a specific string (say called buffer) exists in the list of structs?
i dont understand how to make a copy of it to check with
this is what i have
i want to make a copy because if i dont then
tmp_item_list=tmp_item_list->next;
will screw it up
also this wont work, because somehow when i iterate through the list, it seems the list repeats again...
this compiles fine with no errors/warnings
---------- Post updated at 10:13 PM ---------- Previous update was at 09:00 PM ----------
Hi guys ,
i got segment fault , and when i trace , found it happens since the value of pointer which is returned by Struct S_client (*ptr) is zero
if (ptr !=0)i know , adding above line of code is not the solution and not correct for the case since above line only check for the pointer... (1 Reply)
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 Replies)
i have a linked list set up like
typedef struct client_list {
char *client_name;
int client_socket_fd;
struct client_list *next;
} client;
client *client_list=NULL;
before adding to the list i check if it already exists, only if it does not then i add
if (client_list==NULL... (1 Reply)
Suppose to have:
struct Tstudent
{
string name, surname;
int matriculation_num;
};
struct Tnode
{
Tstudent* student;
Tnodo* next;
} L;I want to deference that "student" pointer. For example, I tried with:
*(L->student).matriculation_numbut it not worked, as terminal... (4 Replies)