I'm not a big fan of pointers.... ;) they require my only neuron to work overtime!!! ;)
Type: Posts; User: andryjohn
I'm not a big fan of pointers.... ;) they require my only neuron to work overtime!!! ;)
ok... I see... It may have occurred when pasting the code :) any way thanks!! ;)
thanks laserlight but what do you mean with
?
oooo yes!! now I see... that's way cleaner!!!
this could be the code:
for (p_corr1=*p_dati; p_corr1!=NULL; p_corr1=(*p_corr1).next)
{
for (p_corr2=(*p_corr1).next;...
... the program this way crashes... because when p_corr1 reaches NULL I try to assign to p_corr2 something pointed by NULL!!!!
i would fix it this way...
while(p_corr1!=NULL)
{
...
.... mmm.... so I have to add
p_corr2=(*p_corr1).next;
at the end of the first while... this way:
p_corr1=p_head;
p_corr2=(*p_corr1).next;
I have a list whose structure is the following:
typedef struct dats_s
{
char email[MAX_STR];
struct data_s *next;
} data;
Yes, you're damn right BEN10! my mistake but I was convinced when I wrote above... (still don't know why... :confused)
any way the correct code is
[CODE]
if(strcmp(command,"yes")==0)
......
the code below is just a hint it's not complete just to give you the idea that I came up with
#include <string.h>
/*contains a lot of string manipulation functions; necessary in this case to...
Hello everybody I need Your help:
I've written the code below as homework but I can't get it to work!
the aim of the program is to extract email addresses from a txt file (our professor wants to...
yes the big problems were the infinite loops and the varible esci not initialized to zero.
the other problems pointed out by dwks are not affecting the results... I wont correct them because I can't...
to bithub:
its just 2 in dimansion becuse it just read i filename is being read in the case i by another scanf!
it's not very clean but it should work.
thanks everybody!!
I'll do the modification suggested in a minute and update..
what do you mean with:
the switch has a lot of "cases" just below him and there's I lot of code too...
any way the problem is that before entering the switch he ask for a command:
...
Sure:
the program has to manage in and out in bank accounts (sort of)
it acquire file1 that contain the following information:
<number of following lines>
<account number> <name> <surname>...
I've written the C code below wich seem to be correct in the syntax BUT it does not what I want!!!
this i what it sould do:
ask a file name
read filename and memorize data in a dynamic list
...