Search:

Type: Posts; User: deathmetal

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. No problems. I will try with #5. If you get...

    No problems.

    I will try with #5.
    If you get chance can you please review my code I put in my last post?

    Thank you laser!
  2. Any code you tried that you could share? What...

    Any code you tried that you could share?

    What are these series/numbers based on in each row?
  3. hi laserlight, the code (trim_whitespace(char...

    hi laserlight,
    the code (trim_whitespace(char *text) with *text = '\0'; in the end ) you shared doesn't work on my end.

    Doesn't work mean I don't get the gene name, but complete line.
    It could...
  4. Thank you. I guessed it could be an issue...

    Thank you.

    I guessed it could be an issue with local and global variable.
    Now, I provide another array, copy into it and it works.





    #include <stdio.h>
  5. modify char array in function || reading lines from file

    I read in file with four columns skipping line one. File is tab/space delimited, my goal is to get the last column.

    I use function where parameter is char array. The function is OK as long it is...
  6. Replies
    16
    Views
    697

    Thank you. I got it.

    Thank you. I got it.
  7. Replies
    16
    Views
    697

    I would like to store the returned in the result...

    I would like to store the returned in the result array, so I make changes as below after //
    It gets annoyed with an error:





    if I make above change I get error as
  8. Replies
    16
    Views
    697

    Thank you laser~!

    Thank you laser~!
  9. Replies
    16
    Views
    697

    I have never used strncat. I think the third...

    I have never used strncat. I think the third parameter is for the number of characters to append. That makes me ask
    in dest_maxlen - left_len - 1

    is -1 at the end for the null character?
    ...
  10. Replies
    16
    Views
    697

    Thank you laserlight. I have folowing...

    Thank you laserlight.

    I have folowing questions:
    1) I cannot understand why dest[0] = '\0'; is needed in the first place.

    2) is it OK to mix size_t with C code? As far as I remember C doesn't...
  11. Replies
    16
    Views
    697

    concatenate string || better way

    Hi there,

    I am new to C from biology background.
    I have two char arrays I would like to concatenate. The expected output is two different strings. For example inputs are john and abbey.

    The...
  12. Replies
    4
    Views
    332

    Hi Matt, Thanks for your reply. unsigned...

    Hi Matt,
    Thanks for your reply.


    unsigned int j=0; ...
  13. Replies
    4
    Views
    332

    C: removing extra spaces in line

    Hi,
    My goal is to remove extra spaces from line.

    I've tried multiple ways, many variables. But I get error for seg fault.

    My code:



    unsigned int j=0;
  14. Replies
    3
    Views
    687

    Hi laser, Thanks much for your reply, and...

    Hi laser,
    Thanks much for your reply, and explaining in detail.
    I'm still trying to absorb what you've said.

    I've fixed my code or malloc.

    Thank you again.
  15. Replies
    3
    Views
    687

    I can have 2D array as: 1) char *p[10]; ...

    I can have 2D array as:

    1)


    char *p[10];

    Or,

    2)
  16. Replies
    3
    Views
    687

    C: array of string - understanding

    gcc -v
    gcc version 4.9.2 (GCC)

    Compiling code:


    gcc -g -Wall -Wextra *.c -o program_parse -pedantic -std=gnu99


    I've a function which takes in a character array, parses it by tab. And...
  17. Replies
    12
    Views
    4,519

    Hi, Thank you for pointing out to the error....

    Hi,
    Thank you for pointing out to the error. Finally it got fixed. Compiler was annoyed with:


    p=strtok(line,'\t');


    in stead of:
  18. Replies
    12
    Views
    4,519

    if I include string.h anywhere else and compile,...

    if I include string.h anywhere else and compile, I get warnings as:
  19. Replies
    12
    Views
    4,519

    Hi laserlight, Thanks for your reply. I've ...

    Hi laserlight,

    Thanks for your reply.
    I've

    #include<stdio.h>
    #include<stdlib.h>
    #include<unistd.h>

    #define _GNU_SOURCE
  20. Replies
    12
    Views
    4,519

    Hi, Thanks for your reply. is...

    Hi,
    Thanks for your reply.
    <string.h> is included before calling strtok.
    Also,
    is a character array not string
  21. Replies
    12
    Views
    4,519

    C: seg fault: using strtok

    Hi members,
    I'm fairly new to C programming. I've worked in python, and bash.

    I want to split string and store it in an array:

    Function takes: character array, and the words in it.



    void...
  22. Replies
    3
    Views
    825

    Hello Yarin, Thanks for your reply to my post....

    Hello Yarin,
    Thanks for your reply to my post.
    Would you suggest with another version: (luna, kepler, etc)?
  23. Replies
    3
    Views
    825

    remote connection - code blocks?

    Hi Members,

    Thanks for your constant support and guidance.
    I'm on Mac 10.9.5

    I started with PDT Eclipse, i.e Eclipse's PHP tool.

    Until now, I've been using Eclipse's C/C++ plug-in to write...
  24. Replies
    9
    Views
    1,093

    Hi Jim, Thank you for your reply. 1- I played...

    Hi Jim,
    Thank you for your reply.

    1- I played around with it, no specific reason.
    Like I said, I could have used emplace with constructors. Also, I want to check if Microbiome object is already...
  25. Replies
    9
    Views
    1,093

    destucting objects - correct way

    I'd like to confirm should I do what I'm doing and is correct/advised.

    I've vector of objects:



    std::vector<Microbiome*> diversity;

    Microbiome* temp_object=new...
Results 1 to 25 of 81
Page 1 of 4 1 2 3 4