optimizers are overrated5928 (4/22/2008 11:38:18 PM) comp.lang.c Optimizers are overrated I started learning ASM not long ago to improve my understanding of the hardware architecture and my ability to optimize C code. The results of my first experiment were surprising to ... copx(116)
answer this question1942 (4/23/2008 10:08:36 AM) comp.lang.c How is the metadata for an assembly stored? (A) In .ini files (B) As XML in the manifest (C) As a Type Library (.tlb) file (D) In the Registry ... vamsee.maha(3)
Need Hashmap in C AND C++1563 (4/25/2008 2:18:16 AM) comp.lang.c Hi, ~ I have found myself in need of some code resembling a Hashmap ~ This is easily done in Java this way: ~ import java.util.*; // __ public class JMith00Test{ public static void main(String[] aArgs){ ... lbrtchx63(143)
Garbage collection #212242 (4/25/2008 12:16:30 PM) comp.lang.c In an interviw with Dr Dobbs, Paul Jansen explains which languages are gaining in popularity and which not: DDJ: Which languages seem to be losing ground? PJ: C and C++ are definitely losing ground. There ... jacob4111(1334)
Is malloc() function provided in <stdlib.h> thread-safe?4424 (4/25/2008 8:12:46 PM) comp.lang.c Hi all, Does anyone have experience on the thread-safty issue with malloc()? Some people said this function provided in stdlib.h is not thread- safe, but someone said it is thread safe. Is it possible this f... climber.cui(14)
Another dynamic memory doubt3120 (4/26/2008 9:46:06 AM) comp.lang.c Hello friends: I have the following code, char* MyClass::MyMethod() { char* ptr = new char[6]; // space for NULL terminator ptr = "hello"; return ptr; delete[] ptr; } What I'm trying to d... nospam21(11322)
Insert a string into a string732 (4/26/2008 12:38:44 PM) comp.lang.c Is there a special function to insert a string into another string ? For example I want to exchange the german "Umlauts" =E4,=F6,=FC with ae,oe and ue in a string. I also wonder if there is a function to get th... HansWernerMarschke(6)
fclose(0)5328 (4/26/2008 3:06:34 PM) comp.lang.c This short program: #include #include int main(void) { int status; status=fclose(0); printf("fclose(0) status: %d\n",status); } crashes on the first two implementations I tried. Then I tried DMC and tha... bc(2211)
why does this code leak?838 (6/4/2008 6:52:39 PM) comp.unix.programmer Hi all, I have a basic question on this code: int main() { char *str; int *num; str = (char *)malloc(20); str ="Hello"; printf("string is %s\n",str); free(str); num = (int *)malloc(20); *num =100; printf("nu... boyphp(3)