C On Character buffer manipulati...

by Mike, October 17, 2007 02:38

Thanks, engtech, that's exa...

A587929f80f37c163f855f5610f2aa0c Talk

C On Character buffer manipulati...

by engtech, October 17, 2007 01:51

if kSpace was supposed to b...

7bfd646dea8e47642bbb573f026bf159 Talk
1
2
3
4
#define kSpace 0x20

char buf[] = {0x42, 0x73, 0x75, 0x27, 0x13, 0x1C, 0x68, 0x1B, 0x64};
...

C On Character buffer manipulati...

by engtech, October 17, 2007 01:50 Star_fullStar_fullStar_fullStar_fullStar_full

Step #1: hex vs dec... what...

7bfd646dea8e47642bbb573f026bf159 Talk

C On Character buffer manipulati...

by Mike, October 15, 2007 11:12

Thanks for the "refactoring...

A587929f80f37c163f855f5610f2aa0c Talk

C On Character buffer manipulati...

by Nathan Sanders, October 15, 2007 01:52

Look at the definition of k...

52feb5a1f3175e3706444ca360fb1271 Talk

C On Character buffer manipulati...

by Andy Lester, October 14, 2007 17:00 Star_full

I suspect you don't really ...

D1588981e0248aaa0174906c99df180e Talk
1
void **node = malloc(sizeof(void *) * 3);  /* A new node */

C On Misbehaving global pointer

by Conrad, October 14, 2007 00:13

You are allocating the arra...

Avatar Talk

C On Misbehaving global pointer

by jonathantan86, October 13, 2007 23:26

Because L now points to a l...

Avatar Talk

C On simplest of mallocs examples

by matrixise, October 11, 2007 06:11

Can you use snprintf ?

8987d77750701f93bb78228c86d2c205 Talk
1
2
3
Service* service = services->at(0);
// or
// Service* service = (*services)[0];

C On pointor of vector problem

by Gerard, October 10, 2007 04:49

You're using square bracket...

Avatar Talk
1
2
3
4
/* Transforms a number to a string
 * e.g 1234 => "1234"
 *
...

C On simplest of mallocs examples

by Anonymous, October 03, 2007 14:07

You forgot to free(s)

Avatar Talk

C On simplest of mallocs examples

by codelion, October 02, 2007 22:40

You need to link to the mat...

82d83583a9a56c3ba36a18015b150b63 Talk
1
You need to link to the maths library as pointed out above. You have a statement of the form include<math.h> the function log10, ceil etc are in that file and the compiler needs to know where to get it from.

C On simplest of mallocs examples

by codelion, October 02, 2007 22:39
82d83583a9a56c3ba36a18015b150b63 Talk
1
cc 49-simplest-of-mallocs-examples.cc -lm

C On simplest of mallocs examples

by takayama, October 02, 2007 21:22

you should link "libm" to u...

C13fc8b8052d56df31f696dff51e7a8c Talk
1
2
3
while(*s){t=*s++-32;for(i=0;i<t>>5;i++,m++)p(' ')for(i=
...

C On C simple loop

by Andy Sloane, October 02, 2007 07:00

Yeah, those characters don'...

Ee9108fb0f4a69c57042c47afa0d18ac Talk
1
2
3
4
#include <stdio.h>
#define p(a) putchar(a);
int main(void){unsigned char*s="Zz[»ŸYÝšÑi!q!á©a‰AáA¡z!aAÑáº!Q©!Áº!A:!19"
...

C On C simple loop

by msdos464, October 01, 2007 06:51

This doesn't have the same ...

D9a391fd7af75d6d43a2694865f7326f Talk

C On C simple loop

by Bisqwit, September 29, 2007 17:29

I noticed the base64'ish pa...

22ca8e11d07e6333c5ce7a414d905dfc Talk

C On C simple loop

by Andy Sloane, September 29, 2007 14:30

Heheh, very nice. The firs...

Ee9108fb0f4a69c57042c47afa0d18ac Talk
1
2
3
4
#define tw(a,b) a(),b()
#define twd(a,b,c) a(){tw(b,c);}
#define ptd(a,b,s,d) a(){b;printf(s);d;}
...

C On C simple loop

by Bisqwit, September 29, 2007 12:37 Star_fullStar_fullStar_fullStar_fullStar_full

Fail, again!

Oh, Cygwin ve...

22ca8e11d07e6333c5ce7a414d905dfc Talk
1
2
3
4
char*a="%c\0  \0_/\\_\0__\0/ /\0/ _ \\/ ",*f,c,n,*q="e5 m1_e4 m1\ne1m3_ / "
"_/m1 m2_p1m2e1m2\n / m1/ -_) _/ _ `/ m1/ m1t1m1/\n/_/e1\\m1/_/ \\_,h3m1/_"
"/\n\ne>m1e2m1\ne1m1 _e1m1 m1e1m3_e1m1_p1m1 p1\n /e1' \\p2 / m1t1_e1/ -_)_"
...

C On C simple loop

by Bisqwit, September 29, 2007 09:16 Star_fullStar_fullStar_fullStar_fullStar_full

I must admit that I'm not v...

22ca8e11d07e6333c5ce7a414d905dfc Talk
1
2
3
4
int k=0;
const char *const LITERAL_1 =
"#CB#_,ab:@BbBXb\\bG]N_2JNH4`X:.MRLA,"
...

C On C simple loop

by tmiz, September 29, 2007 07:11 Star_fullStar_fullStar_fullStar_fullStar_full

I changed it for the almost...

48c7113cf6a39b7cd9c590fa1835e3fa Talk
1
2
3
4
_=0;c(q){q<0?putchar("`',)( \n-\\_/"[q+11]):c(("!A@!]*_`8>@"
"`@V`Z`E[L]0HLF2^V8,KPJ?*_?&H^'@DPR@PJ%!!!!]QHY.PH``ZP[L;3*"
"42VKKP754F`ZOJ?PXYM+RXYPR:PRHXZ3!^P*"[_/6]-33>>_++%6&1?"FL"
...

C On C simple loop

by Andy Sloane, September 28, 2007 23:06

dave parker: It is C, and i...

Ee9108fb0f4a69c57042c47afa0d18ac Talk
1
2
3
4
#include <stdio.h>
int main(void)
{
...

C On C simple loop

by Bisqwit, September 28, 2007 04:20 Star_fullStar_fullStar_fullStar_fullStar_full

Your code is not portable. ...

22ca8e11d07e6333c5ce7a414d905dfc Talk
1
2
3
4
_=0;c(q){q<0?putchar("`',)( \n-\\_/"[q+11]):c(("#"
"CB#_,ab:@BbBXb\\bG]N_2JNH4`X:.MRLA,aA(J`)BFRTBRL"
"'####_SJ[0RJbb\\R]N=5,64XMMR976Hb\\QLARZ[O-TZ[RT"
...

C On C simple loop

by chris, September 28, 2007 02:55
7dad18e6e49e447a8a0eb7fb5ae66cbb Talk

C On C simple loop

by Kuroki Kaze, September 28, 2007 02:48

this is what you call a "Si...

E116f82ebbf866168f363b66a54cd486 Talk