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!
Type: Posts; User: deathmetal
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!
Any code you tried that you could share?
What are these series/numbers based on in each row?
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...
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>
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...
Thank you. I got it.
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
Thank you laser~!
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?
...
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...
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...
Hi Matt,
Thanks for your reply.
unsigned int j=0; ...
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;
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.
I can have 2D array as:
1)
char *p[10];
Or,
2)
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...
Hi,
Thank you for pointing out to the error. Finally it got fixed. Compiler was annoyed with:
p=strtok(line,'\t');
in stead of:
if I include string.h anywhere else and compile, I get warnings as:
Hi laserlight,
Thanks for your reply.
I've
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#define _GNU_SOURCE
Hi,
Thanks for your reply.
<string.h> is included before calling strtok.
Also,
is a character array not string
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...
Hello Yarin,
Thanks for your reply to my post.
Would you suggest with another version: (luna, kepler, etc)?
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...
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...
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...