I think I skipped quzah's post, at least I didn't follow the link. :o
Any precision would be appreciated :D, I read the K&R chapter about this a bit quickly I must confess... But an idea of how...
Type: Posts; User: P.Phant
I think I skipped quzah's post, at least I didn't follow the link. :o
Any precision would be appreciated :D, I read the K&R chapter about this a bit quickly I must confess... But an idea of how...
Well correct me if I'm wrong, or if didn't understand what minignaz means to do, but what I understood is that he wants to "resize" an array. In this case using malloc/calloc then free and memcpy...
And you could use realloc to give it a chance to run faster.
if (s1[j] == '\0')
s1[k++] = s1[i];
I think the problem is there no? (didn't try to run it)
it should be:
if (s2[j] == '\0')
s1[k++] = s1[i];
Thanks Salem.
I realise that, that was just an exemple, albeit not a very good one :).
I feel a bit stupid to insist about this thing, since I have actually never encountered a problem. What...
Thanks guys.
Salem, I might be wrong, but I think what you are saying is true only for complement to 2 representation.
"implementation defined" OK :) . Not very portable though.
Can I expect...
It feels like I'm drowning in a glass of water...
Am I missing something or according to the standard does this have undefined behaviour when working with non ASCII chars?
//...
int i =...
Thanks quzah.
:)
Why didn't I think of outputting the pointer? oh well...
Sorry I'm kind of highjacking the thread but I've been wondering about this for some time:
say I write
foo1("Hello World");
and somewhere else in the same module:
foo2("Hello World");
...
C99 would accept that:
int html_findstarttag(char *src, char tag[]) {
char search[strlen(tag) + 3 ];
html_createstarttag(search, tag);
return whereis_string(src,...
Thanks again, there seems to be a problem with flashdadee for now and I've been unable to find your code. But though I do not really know much Assembly (yet) I I'll try to look into it.
Thanks ygfperson.
I *think* that for most implementations arguments is simply a pointer to the stack. In this case no problem to assign the address to an other va_list, or to pass the pointer by...
Under Windows Mingw is a good bet I think (gcc port), though the broken features also aplies there. As a bonus you can have an IDE :
Dev C++
That is what I use and I'm happy with it :). But then I...
Hi, I'd like to know if this will do what I expect on all platforms (standard C99):
void foo1(va_list arguments)
{
va_list arg_copy;
va_copy(arg_copy,arguments);