تبلیغات :
ماهان سرور
آکوستیک ، فوم شانه تخم مرغی ، پنل صداگیر ، یونولیت
دستگاه جوجه کشی حرفه ای
فروش آنلاین لباس کودک
خرید فالوور ایرانی
خرید فالوور اینستاگرام
خرید ممبر تلگرام

[ + افزودن آگهی متنی جدید ]




نمايش نتايج 1 به 3 از 3

نام تاپيک: کمک در مورد این پروژه

  1. #1
    در آغاز فعالیت
    تاريخ عضويت
    Sep 2009
    پست ها
    4

    پيش فرض کمک در مورد این پروژه

    ا سلام
    دوستان من بک گراند مهندسی کامپیوتر و برنامه نویسی با C رو ندارم. به دلایلی مجبور شدم درس Operating Systems رو بگیرم. متاسفانه 40 درصد نمره اختصاص به پروژه هایی داره که باید با C بنویسم. اولین پروژه مربوط به لیست های پیوندی میشه ظاهراً که اینجا کپی می کنم. انتظار ندارم که پروژه را برام انجام بدید اما به دلیل اینکه هیچی نمی دونم خواهش می کنم به صورت قدم به قدم بگید که باید چی کار کنم. الان دارم در مورد لیست های پیوندی مطالعه می کنم. لطفاً هر کی می تونه کمک کنه.


    Project 1 description
     For this homework, you will be constructing a linked list
    implementation in C using the templates provides above.
     You may need to modify the data structure (or add new data
    structures) defined in list.h. However, you MAY NOT modify the
    function defined in list.h. You may need to complete the function
    bodies in list.c. You can add new functions into list.h.
     Create a test program to generate, populate and manipulate S
    (S<M) linked list.
     Test data in the format of an M x N matrix will be provided.
     Toy example (10 x 11):
    0 0 0 6 8 4 8 1 5 7 4
    8 7 7 5 7 3 0 0 0 0 3
    3 5 7 3 4 7 0 0 0 0 1
    0 0 8 2 7 6 2 4 4 5 0
    0 0 0 1 7 7 3 4 5 6 1
    0 0 7 4 4 8 5 7 3 5 2
    0 8 1 5 5 1 8 8 4 7 5
    5 3 4 7 2 0 0 0 0 0 8
    4 3 7 8 2 2 6 4 0 0 3
    0 0 0 8 6 7 4 6 8 5 0

    Project 1 Task
     Task Breaking down
    1. Read the data into memory using file operations.
    2. For the first S rows, put every element from the same row of the matrix into
    a new linked list, so you will have S linked lists.
    3. For every link list, implement the f function to calculate the walking
    distances and record this distances into a linked list d.
    4. Repeat the same operations for the rest rows (M-S).
    5. Plot the curve with matlab about the values of d.
    6. A written report is required.
     Due date: Sep. 28th, 2009.

    Project 1 (Intlist.h)
    #ifndef __intlist_h__
    #define __intlist_h__
    /* each entry in the list contains an int */
    typedef struct intlist {
    int datum;
    struct intlist *next;
    } INTLIST;
    INTLIST *init_intlist( int n ); /* initializes the intlist with initial datum n */

    int insert_intlist( INTLIST *lst, int n ); /* Inserts an int (n) into an intlist from the beginning*/
    void list_append(INTLIST *list, void *datum); /* Inserts entry to the end of the list */
    Void list_front(INTLIST *list); /*return the element at the front of the list, and remove it from the
    list*/
    void list_map( INTLIST *list, void (*f)(void *) ); /*Applies a function to each element of the list */
    void list_delete( INTLIST *list ); /* Deletes (and frees) all entries in the list */
    #endif

    Project 1
     Intlist.c

    #include <stdlib.h>
    #include “intlist.h”
    /* initializes the intlist with initial datum n */
    INTLIST *init_intlist( int n ) {
    INTLIST *lst;
    lst = (INTLIST *)malloc(sizeof(INTLIST));
    lst->datum = n;
    lst->next = NULL;
    return lst;
    }
    Project 1
     myprogram.c

    #include <stdlib.h>
    #include “intlist.h”
    /* execution starts here */
    int main() {
    INTLIST *lst;
    lst = init_intlist(1);

    insert_intlist( lst, 2 );
    free( lst );
    return 0;
    }

    Project 1
     Makefile: putting everything together

    CC=gcc
    CFLAGS=-Wall -g
    LIBS=-lreadline -lm
    OBJS=intlist.o
    INCLUDES=common.h
    all: $(OBJS)

    $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o myprogram
    .c.o: $*.h $(INCLUDES)
    $(CC) $(CFLAGS) -c $*.c
    clean:
    rm -f *.o myprogram

  2. #2
    حـــــرفـه ای sin2x=2sinxcosx's Avatar
    تاريخ عضويت
    Dec 2007
    پست ها
    2,234

    پيش فرض

    سلام !
    يعني کلا در مورد ليست پيوندي راهنمايي مي خواين يا فقط در مورد چگونگي کارکرد اين برنامه ؟
    اگه هم قراره رو اين برنامه بحث شه لفطه برنامه رو داخل تگ html قرار بدين . يعني قبل از کدها کلمه [html] و بعد از اون [html/] رو بنويسين .

  3. #3
    در آغاز فعالیت
    تاريخ عضويت
    Sep 2009
    پست ها
    4

    پيش فرض

    با تشکر
    تونستم مشکل رو حل کنم.

    ممنون

Thread Information

Users Browsing this Thread

هم اکنون 1 کاربر در حال مشاهده این تاپیک میباشد. (0 کاربر عضو شده و 1 مهمان)

User Tag List

قوانين ايجاد تاپيک در انجمن

  • شما نمی توانید تاپیک ایحاد کنید
  • شما نمی توانید پاسخی ارسال کنید
  • شما نمی توانید فایل پیوست کنید
  • شما نمی توانید پاسخ خود را ویرایش کنید
  •