C/C++

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
Home » Tech Support »» C/C++
  • Final Theory Of Everything V2.0

    /*It is possible to use martingale probability theory to beat some gamesof chance. In a fair game of coin toss, where the odds reach anequilibrium of 50/50 chain reactions do occur. This can be explainedusing martingale probability theory, but in simpler terms it only showsan example of how orde...

    6 answers | 8047 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Nano Technology Application For Health,Wellness and Beauty

    Dear lovely moderator, please allow me to spread this information,somebody might need it, please forgive me if you are botheredDear All, this might be useful for you and your familyI have already use it and prove that my family health is now very muchimprove,no more headache, no more back pain,...

    1 answers | 2983 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Auditing C code

    I'm working with some legacy C code. Apparently the author didn't knowor care about the difference between int, int16_t, unsigned int, and soon. He does a lot of bitwise |, &, etc on signed int, without regard tothe size of int and sign flipping. The result is that the code producesval...

    10 answers | 699 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Final Theory Of Everything V1.0

    It is possible to use martingale probability theory to beat some gamesof chance. In a fair game of coin toss, where the odds reach anequilibrium of 50/50 chain reactions do occur. This can be explainedusing martingale probability theory, but in simpler terms it only showsan example of how order...

    6 answers | 7319 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • system() in the absence of a command processor

    According to 7.20.4.5 of n869, system() can report whether the hostenvironment has a command processor (when passed a null pointer)., if there is a command processor, non-null string argumentsto system() are passed to it. However, the text doesn't specificallystate what occurs when there is...

    8 answers | 429 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • "Private to subproject" functions and variables

    Hi all,maybe it's an old question, but I couldn't find an answerlet's say I have this kind of directory structure for project foo:/foo/includes/mod1.h (exported by mod1)/foo/includes/mod2.h (exported by mod2)/foo/mod1/file1.c/foo/mod1/file1.h (exported by file1)/foo/mod1/file2.c/f...

    2 answers | 1060 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Address of address

    If I have an array of int:int array[8];I suppose the correct way to clear it using memset() would be:memset(array, 0, 8 * sizeof(int));However, I've seen the following in a piece of code:memset(&array, 0, 8 * sizeof(int));What does (or shall) the compiler do in this case? Is the behaviour d...

    11 answers | 378 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Why MULT 31 (hash function for string)?

    Hi there,There's a classic hash function to hash strings, where MULT is definedas "31"://from programming pearlsunsigned int hash(char *ptr){unsigned int h = 0;unsigned char *p = ptr;int n;for (n = k; n 0; p++) {h = MULT * h + *p;if (*p == 0)n--;}return h % NHASH;}Why MULT defined as 31? (...

    29 answers | 438 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Avoiding "use of cast expressions in lvalues is deprecated"

    Hi guys,We have the following macro:#define NEXT(type,p) (*((type*)(p))++)It provides a way to poke variable sized data into an array of pcodefor a simple VM.e.g,NEXT(byte,pcode) = PUSH;NEXT(int,pcode) = constant;But this technique now seems to be deprecated. It seems fairly safe tome (pointers...

    21 answers | 572 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Linked list declaration

    Something I don't really understand.In , Insert and Delete for linked listare defined as:int Insert(node **head, int data)andint Delete(node** head, int deleteMe)I thought linked-list is always defined as something like struct node*head. Why the author defined the linked-list as pointer to...

    3 answers | 472 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Question on macro substitution

    Hi all,I have the following code ,#include <stdio.h>#define f(a,b) a##b#define g(a) #aint main(void){printf("%s\n",g(f(10,20)));return 0;} that i got isf(10,20)But i expected1020My assumption was1) first f(10,20) is replaced by 1020 , because of macro f(a,b)concantenates its arguments2) th...

    2 answers | 670 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • manipulating console output.

    Hi all,I'm doing a small c program which backs up the mbr of hard disk.Currently working in linux.what i did was :system("sudo dd if=/dev/sda of=mbr.bin bs=512 count=1");This is the output i got from console.1+0 records in1+0 records out512 bytes (512 B) copied, 7.6e-05 seconds, 6.7 MB/sis...

    3 answers | 551 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

SPONSORED
QUESTION
SPONSORED
EMSDN