Poeter.se logo icon
Redan medlem?   Logga in




 
unfinished c coding...to be continued...


permutations coding

#include
#include
#define MAX_P 25

struct permutation
{
int perm[MAX_P];
int length;
int number;
int t_number;
struct permutation *next;
};

struct permutation *ny,*first;

void build_perm_list(struct permutation*, int length);
void link_perm(struct permutation*,int length);
void put_m_at(struct permutation *,int j);
/*uppfyller skapa typestruct till functions pekare...*/

int main(int argc, char *argv[]) /*argv[] is an array of pointers*/
{
first=NULL;
ny =(struct permutation*)malloc(sizeof(struct permutation));
first=ny;
system("PAUSE");
return 0;
}

void build_perm_list(struct permutation *first, int length)
{
int i;
for(i=0;i<=first->length;length;i++)
{
}
}

void link_perm(struct permutation *first,int length)
{

}

void put_m_at(struct permutation *first,int j)
{

int i,m;
m=first->length+1;
ny =(struct permutation*)malloc(sizeof(struct permutation));
/*kopiera elementen från delpermutationen*/
while(i {
ny->perm[i]=first->perm[i];
i++;
}
ny->perm[i];
i++
while(i {
ny->perm[i]=first->perm[i];
i++
}
}




Bunden vers (Haiku) av PolyMathWolverine
Läst 214 gånger
Publicerad 2007-02-14 03:09



Bookmark and Share


  Merrlina
ok *ler*
den var annorlunda
2007-02-14
  > Nästa text
< Föregående

PolyMathWolverine
PolyMathWolverine