Forum: C Jul 7th, 2009 |
| Replies: 13 Views: 829 Ahh, cheers
Thanks!
This will come in handy |
Forum: C Jul 7th, 2009 |
| Replies: 13 Views: 829 I'm aware of the fact that I can tokenize the entire string,
but if I (dependent on the first token) just want the rest of the line,
without the need to tokenize it. How do I do that |
Forum: C Jul 6th, 2009 |
| Replies: 13 Views: 829 If I simply just want to tokenize the first element of a string and then output the remainder of the string, how can this be accomplished?
thanks
#include <stdio.h>
#include <string.h>
int... |
Forum: C Jul 2nd, 2009 |
| Replies: 9 Views: 461 Thanks ppl,
I need to keep track of the indices,
so the strtok approch wont work.
But thanks again. |
Forum: C Jul 1st, 2009 |
| Replies: 9 Views: 461 Hi,
given a cstring, I need to extract the digits in it, the digits are prefixed with either a '+' or '-'. Like
,.,.,.,+3ACT,.,.,.,.-12,.,.,.,.,.,.,.,actgncgt
#OUTPUT
3
12
I've made a... |
Forum: C May 30th, 2009 |
| Replies: 10 Views: 586 Just out of curiosity, what languages should be faster?
Assembler, fortran? |
Forum: C May 30th, 2009 |
| Replies: 2 Views: 615 Hi,
Question
Why does valgrind complain?
Conditional jump or move depends on uninitialised value(s)
==25636== at 0x4C26D29: strlen (mc_replace_strmem.c:242)
==25636== by 0x40060A:... |
Forum: C May 30th, 2009 |
| Replies: 4 Views: 353 Thanks people,
very helpfull indeed.
Thanks |
Forum: C May 29th, 2009 |
| Replies: 4 Views: 353 Hi I stumpled upon some c-code,
which syntactically is different from what I've seen before.
first
void strreverse(char* begin, char* end) {
char aux;
while(end>begin)
aux=*end,... |
Forum: C May 29th, 2009 |
| Replies: 4 Views: 911 Well, this isn't at the bitlevel,
you are interpreting the ascii values '0' '1' as bit 0 and bit 1.
If you are interested in this bitlevel stuff,
you should look into the shift operations.... |
Forum: C Mar 17th, 2009 |
| Replies: 4 Views: 357 lol, got to remember this one |
Forum: C Mar 13th, 2009 |
| Replies: 4 Views: 1,780 It depends on how you matrix is defined as a datastructure.
Sometimes they are defined as one long array.
Then you can just add the array elementwise.
If they are defined as double pointers,... |
Forum: C Mar 13th, 2009 |
| Replies: 2 Views: 464 I would use modulo and div
that is if I want to extract the second digit of 234
I would (234 %100)/10
The first paranthesis, strips out the 2 such that 34 remains
this slash 10 then... |
Forum: C Mar 12th, 2009 |
| Replies: 6 Views: 544 I can understand why you call it urgent, when it is urgent for you.
But that doesn't make it urgent for me.
I don't read every post on the boards I've signed up for,
I just check the first page,... |
Forum: C Mar 12th, 2009 |
| Replies: 5 Views: 1,268 On a general note, (anyone correct me if I am wrong).
The bool type is part of the c99 standard, and is as such not expected to be as portable.
I've never found a use for the bool type that the... |
Forum: C Mar 12th, 2009 |
| Replies: 2 Views: 344 Hi,
I had som difficulties understanding what you wanted but I think I got it now.
You want draw a star with an uneven number of points using stdoutput?
Do you use some special algorithm for... |
Forum: C Feb 10th, 2009 |
| Replies: 4 Views: 753 Hey,
does anyone know if it possible to have something like
#DEFINE NUM_DEC 4
printf("This is your value:%.NUM_DECf\n");
thanks in advance |
Forum: C Dec 18th, 2008 |
| Replies: 3 Views: 514 I'm using linux.
But thanks.
I have programs that works on textfiles,
these does parsing and conversion.
instead of writing
./myprog afile.txt |
Forum: C Dec 16th, 2008 |
| Replies: 3 Views: 514 Hi,
I was thinking about implementing piping and redirection in some of my programs.
But I'm having difficilties getting started.
Does anyone know were to read up on this area,
or just what to... |
Forum: C Nov 23rd, 2008 |
| Replies: 2 Views: 1,866 I've made a program using gcc as a compiler.
In my loops I've been using a uint type as the type of my loop variable.
But now it seems that some systems doesn't support this type.
Can I... |
Forum: C Sep 2nd, 2008 |
| Replies: 7 Views: 692 I don't really understand what your doing here,
this has nothing to do with linked lists.
you need to do use a struct like
typedef struct lnode
{
int data;
struct lnode *next;
}... |
Forum: C Sep 2nd, 2008 |
| Replies: 4 Views: 452 Can you elaborate on your problem.
Given the subject of your post,
I thought you had problems opening a file in your code.
But it seems there are no file input/output.
Can you compile the code,... |