Search:

Type: Posts; User: paulur

Search: Search took 0.00 seconds.

  1. Replies
    18
    Views
    3,440

    See you guys. I don't think I'll be back here....

    See you guys.

    I don't think I'll be back here.

    Thank those guys who helped me.
  2. Replies
    18
    Views
    3,440

    Salem, you're really hard to be communicated....

    Salem,

    you're really hard to be communicated. would you please ignore my message?

    Thanks!

    Paul
  3. Replies
    18
    Views
    3,440

    ssharish2005, Here is the code. You can see...

    ssharish2005,

    Here is the code. You can see at line 18, which is commented because malloc() doesn't work here, and i've got to put it at line 35.



    14 struct record *...
  4. Replies
    18
    Views
    3,440

    My question is that it's supposed that malloc can...

    My question is that it's supposed that malloc can be called at either place; but my program only works if malloc is called at //comment 2, but does not work if malloc is called at //comment 1.

    I...
  5. Replies
    18
    Views
    3,440

    ssharish2005, Thanks for the message. My...

    ssharish2005,

    Thanks for the message.

    My real code is a bit more than what is shown, but like following:


    struct record * build_record(struct record* rec, int rec_id){
    string...
  6. Replies
    18
    Views
    3,440

    Here is the code: struct record *...

    Here is the code:


    struct record * build_record(struct record* rec, int rec_id){
    //comment 1 ????
    //rec = (struct record *)malloc(sizeof( struct record));
    rec->id ...
  7. Replies
    18
    Views
    3,440

    Salem, Thanks for reply. The problem is...

    Salem,

    Thanks for reply.

    The problem is that if malloc() is put in the loop of create_rec_array(), the program works; but if malloc() is in create_an_rec(), it does not work. That's my...
  8. Replies
    18
    Views
    3,440

    Sorry about the confusing code. What i want to...

    Sorry about the confusing code.

    What i want to ask is that if


    recs[i] = malloc( sizeof( struct record) );


    is declared in create_record_array(), the program runs correctly; but if the...
  9. Replies
    18
    Views
    3,440

    array of pointers of a struct

    I've got an array of struct pointers as following


    struct record{....}
    struct record*[]

    and two methods:


    create_a_record(struct record*)
  10. Replies
    3
    Views
    1,686

    Yeh, that really is the reason casued the error!...

    Yeh, that really is the reason casued the error!

    But I just can't understand why it likes that. because both stringArr and l are char**....

    Many thanks!

    Paul
  11. Replies
    3
    Views
    1,686

    assign values to string arrays

    Hi,

    I want to assign values to a string array, which is declared as char** stringArr, by reading a file. One line of the file is to be one element of the string array. My code is as the following:...
  12. Replies
    5
    Views
    1,890

    I've just figured out by myself as the following ...

    I've just figured out by myself as the following :D

    hope it can help anyone in future. And thanks for the helps from these nice guys.

    #===================START============================...
  13. Replies
    5
    Views
    1,890

    Thanks for the message. Now i'm using : ...

    Thanks for the message.

    Now i'm using :
    .c.o:
    $(CC) -c $(CFLAGS) $<

    rather than individaul lines to declare complie. How should I add the directory information in this command?
    ...
  14. Replies
    5
    Views
    1,890

    hi dude543, Thank you so much for your help! ...

    hi dude543,

    Thank you so much for your help!

    Another question is that how to put the compiled file in a predifined directory. For example, there is a directory ./output/, and I want all the...
  15. Replies
    5
    Views
    1,890

    help: makefile: directory rules

    There are two directories /src1 and /src2 where the soruce codes are, and another directory /headers for head files.

    How should the makefile set variables ( not to hard code all the...
  16. Replies
    18
    Views
    7,834

    Is it required a NULL element in the array, as...

    Is it required a NULL element in the array, as it's mentioned above?
  17. Replies
    18
    Views
    7,834

    eh, make sense!

    eh, make sense!
  18. Replies
    18
    Views
    7,834

    hi quzah, Given a char**, is there any way...

    hi quzah,

    Given a char**, is there any way that can find the number of elements in this char**?

    Thanks!

    Paul
  19. Replies
    18
    Views
    7,834

    Actually, what i did is as following, ...

    Actually, what i did is as following,



    char** aString // already assigned values by whatever way...

    int i = 0;

    while(aString[i] != NULL){
    printf("%s", aString[i++]);
  20. Replies
    18
    Views
    7,834

    That's really cool....... :p

    That's really cool....... :p
  21. Replies
    18
    Views
    7,834

    Hi guys, Thanks for the mesaages. They're...

    Hi guys,

    Thanks for the mesaages. They're really helpful.

    Just want to know, if I don't know the size of the array, say, I've just got a char**, rather than char*[]. how can i set the loop?
    ...
  22. Replies
    18
    Views
    7,834

    Hi quzah, Thank you so much for your help. ...

    Hi quzah,

    Thank you so much for your help.

    Just a bit confused about y, what dose it refere to?

    I'm quite newbi....

    Paul
  23. Replies
    18
    Views
    7,834

    traverse a string array

    Hi,

    How can i traverse a string array. for example, there is string array char** strings, and I just want to print every element (string) of this array.

    Many thanks for your help!

    Paul
Results 1 to 23 of 23