Since 5/7/2012 3:11:20 AM, ni7369 has written 2 articles and participated in 70 conversations. ni7369 signature: ni7369
ni7369's articles:
Items(2) /1
computing with characters2824 (4/30/2008 6:13:17 AM) comp.lang.python How can I compute with the integer values of characters in python? Like 'a' + 1 equals 'b' etc ... SL
allocating zero bytes332 (1/20/2008 5:42:09 PM) comp.lang.c++ char *s = new(std::nothrow) char[0]; std::cout << (void *)s << std::endl; On my machine the value of s does not equal NULL. What does the standard say about that? ... Serve
Unions in structures931 (3/16/2008 5:37:52 PM) comp.lang.c I recently noticed (I'm new to the language) that when using a union type as a component of a structure, you don't need a union-tag. struct foo { char *ptr; union { int i; flo... blockstack(7)
The problems in comp.lang.c21639 (3/23/2008 4:40:20 PM) comp.lang.c Dear everyone I've been lurking in this group for a few weeks now. Originally I had a question to ask (about atomic/threadsafe operations in C), and I wanted to get the feel of the newsgroup first. In fact I'v... nospam21(11322)
Fedup with SPAM3134 (3/31/2008 11:05:48 AM) comp.lang.c Hi All, I am fedup with the amount of spam in this group can anything be done for this ? -dK ... mcdivyakanth(82)
sizeof in old C compilers634 (4/18/2008 5:14:36 PM) comp.lang.c I ran across some old C code that was written something like this: int array[NUM_ELEMENTS]; .. . . memset(array, -1, sizeof(int)*NUM_ELEMENTS); The code is filled with this idiom on memsets (and memcpys and .... Bill571(352)
memset o/p not correct4641 (4/19/2008 9:28:14 PM) comp.lang.c Hi, the following is actually a part of the pattern matching program which i tried ,memset is not setting the entire integer array with -1 #include #include #include int main(void) { int maxpat[8... aarklon(253)
lcc-win32 conformance question5026 (4/25/2008 11:17:50 PM) comp.lang.c If I compile this program int main(void) { return 0; // foo bar baz } with "lc -A -ansi89 foo.c" (minus the quotes), no diagnostic is produced; but isn't this style of comment illegal in C89 and ... tea(9)
Python(2.5) reads an input file FASTER than pure C(Mingw)2317 (4/26/2008 3:10:09 PM) comp.lang.python Both codes below read the same huge(~35MB) text file. In the file > 1000000 lines, the length of each line #include #include #include using namespace std; char vs[1002000][99]; FILE *fp=fopen("D:\\some.txt... n00m(146)
Fastest way to check variable against two values1725 (5/2/2008 3:06:50 PM) comp.lang.c In python, I could write: a = 1 if a in [1, 2]: do something... In c (and many other languages): int a = 1; if (a == 1 || a == 2) { do something... } Is there a shorter, cleaner syntax? ... wswilson(17)