fixed the things Quzah wrote & others. The new version:
char *ConSort(PERSON arr[TOT])
{
int i=0, j;
char *temp=NULL, **Lname[TOT];
while( i<TOT )
{
Type: Posts; User: ronenk
fixed the things Quzah wrote & others. The new version:
char *ConSort(PERSON arr[TOT])
{
int i=0, j;
char *temp=NULL, **Lname[TOT];
while( i<TOT )
{
I have data struct of Citizens I need to transfer them to array of string, then sort that array.
This is what I wrote:
ConSort(PERSON arr[TOT])
{
int i=0, j;
char *temp=NULL, **Lname[TOT];...
only when I put
>while (i<STN)
in first loop, can function work.
didn't manage to find any other solution to it.
FindLines (LINE *L)
{
int i=0, orgn, dest;
This is my modified function, as I understood your offer:
FindLines (LINE *L)
{
int i=0, orgn, dest;
LINE *temp;
temp=L;
puts ("\nEnter origin station code first and destination station...
I'm writing a program which organizes a buses network.
these are the structs I use:
typedef struct lns{
int num;
struct lns *nextline;
}lns;
typedef struct stns{
this form seem clearer to me.
#include <stdio.h>
typedef struct
{
float x;
float y;
}point2D;
createbi, creates a bi-linked list out of the one-way linked list.
I don't see how I do these assignments, without failing, when I have 2 types of struct.
Please help.
void createbi (FOO...
OK, thanx.
this is the last version, which works fine, also with large array!
Thanx!
#include<stdio.h>
#include<malloc.h>
#include<math.h>
#include<stdlib.h>
I see. thanx.
No reason... I accept this version.
actually the intention was to do something like this:
This code build dinemically allocated square matrix (designed for the dimenssion of the 1D array), and copy into it an array. The empty places in the matrix are filled with -1.
The thing is I have...
Now it's Ok.
Thank you!
both solutions didn't do.
I have an exam in 2 days, so I might leave it as is. Don't want to waste to much time on it.
Thanx for your efforts!
BTW: what numbers did you put before when you said...
this is a sample of input:
enter number of items
10
enter number
1
enter number
2
enter number
3
enter number
this is the code i'm rubning without Prev->next=p; & i still get errors.
void find (item **hp)
{
item *q=(*hp);
item *p=(*hp)->next, *temp, *Prev;
while (q->next)
{
tried to run code & its still no good.
this comment is clear & I've fixed it.
didn't understand this one , though. what is the buttom line here?
I had to modify this function a bit, & it still doesn't fluently do the job. What i noticed was that on smaller lists: up to 5 five numbers, its OK. above it: list got lost...
void find (item...
That's perfect!
Let’s go one step further. If want to check for duplication number accross the list.This is what I wrote & I get errors.
void find (item **hp)
{
item *q=(*hp);
...
tried this one, but it didn't work for me.
I have modified this program a little: FREE & delemiddle functions where removed. find function has a little addition of scanning all list with all...
This program has to scan linked list & find occurrence o more then one instance of a number, then delete it. Output I get sometimes shows deletion of only one instance of multiple numbers, and...
Ok, now I see your point.
I did. this solved the problem.
Thanx!
Other then changing variables names I don't see any significant change in the code above. The output is left the same; I still seem to lose the link to the list.
Quzah, what are hidden...
This is my full code:
#include <stdio.h>
#include <malloc.h>
typedef struct visit_node
{
char v_name;
struct visit_node *next_ptr;
This function is deleting a node from linked list. It is OK with nodes which are not the first node. When I send anchor to function, I lose the link to the rest of the list. Why is it so?
...