diffrence between generic pointer and pointer in c language?
369213
1. Generic pointer is nothing but void*.\n2. A generic pointer/void* can be easily type casted to the desired datatype.\n3. Main differenc between the generic pointer and pointer of specific datatype: The void* is capable of pointing to the variable of any datatype whereas pointer of specific datatype say int* can point only to the variable of type int.\n4. Generic pointer is also used for taking the address of the variable alone.\n4. Whenever you are using void*, typecasting is required to perform the operation on the content that void* points to.\n5. Be careful when you are doing any arithmetic operation with void*.
369068
Pointers are variables that only point to memory locations instead of variables that contain the information itself.  Other languages use pointers to point to complex data types such as a data structure, but C allows much more robust pointers.  A pointer will use a lot less memory to point to a memory location that having to use the memory itself every time.
1147478
Memory Handling.\nWhatever memory space you occupy by instantiating the objects should be released after your use.\nType Casting should also be taken care.
1140564
I am not sure i got ur question but i presume you are asking about C++ in general. It object oriented programming different form the structured programming style of C.Object oriented binds data to methods and provides a better level of abstraction...if this sounds geek...learn about Classes and objects...else send me a mail...aint bragging but i am pretty good in C++
52447
pointer is a variable that holds another variables memory adress. an it can be use like variable.
736487
Whenever a function is called, the current context(like line no., variables value, etc.) of the execution get pushed in STACK  MEMORY area of RAM and when the function returns it pops the current context and resumes the execution. When u call the function multiple times inside another, then the stack memory may exhaust with the context value, then this is called as stack overflow.\n\nIt generally occurs when the recursion functions are poorly written.
692205
its possibile to change data in address locations outside of the scope of the variable.\nexample:\n\nint a;\nint *p;\n\nint a = 2;\np = &a; //get address of a\np++;    //inc pointer\n*p = 5; //load address with 5\nwhere is p pointing to? not a, so we just over wrote some other address that may contain other data.
662885
No difference ,they are all used for dynamic allocation.only syntax difference i guess.
528997
Operator overloading is just “syntactic sugar,” which means it is simply another way for you to make a function call.\n\n\nThe difference is that the arguments for this function don’t appear inside parentheses, but instead they surround or are next to characters you’ve always thought of as immutable operators.\n\n\nThere are two differences between the use of an operator and an ordinary function call. The syntax is different; an operator is often “called” by placing it between or sometimes after the arguments. The second difference is that the compiler determines which “function” to call. For instance, if you are using the operator + with floating-point arguments, the compiler “calls” the function to perform floating-point addition (this “call” is typically the act of inserting in-line code, or a floating-point-processor instruction). If you use operator + with a floating-point number and an integer, the compiler “calls” a special function to turn the int into a float, and then “calls” the floating-point addition code.
404314
C compiler allocates memory for a structure variable by \naligning to a word boundary.\nstruct ex\n{\nchar a;\nchar b;\n};\n the structure has only 2 bytes. So the compiler pads with 2 more bytes as a word is 4 bytes\nYou can also make the compiler not to use the padding
324617
Why are you passing large amounts of data between programs?\n\nIt would be better to pass a pointer to the working storage location.\nYou may have to call another program to get the address of the storage.
138457
Assuming this is in C, this is an impossible problem given the main program you provided, because you're passing in the parameters by value rather than by reference.  So any changes you make to those values inside the function will disappear once you return to the main context.\n\nIf you're allowed to change the main program to use pointers, you could do this:\n\nvoid sort2 (int *a, int *b) {\n  int tmp;\n\n  if (*a > *b) {\n   tmp = *a;\n   *a = *b;\n   *b = tmp;\n  }\n}\n\nGiven your main program, you'd call it like this:\n  sort2(&u, &v);\n\nBut it may be that this assignment was given to you specifically to demonstrate that you can't change the value of variables that you pass in by value).
654224
#ifndef QUEUE_H_\n#define QUEUE_H_\nFile: queue.h\ntypdef item_t int;\nstruct Queue  {\n   item_t contents;\n   Queue* next;\n};\n\n/* Public Interface */\n/* Adds a new item to the end of the queue */\nvoid enqueue(item_t datum, Queue* head);\n/* Removes the head of the queue. */\nQueue* dequeue( Queue* head );\n/* Returns the element at the top of the queue */\nitem_t* top(Queue* head); \n#endif\n--------\n\nFile: Queue.c\n\nvoid enqueue(item_t datum, Queue* current){\n      if (current == NULL){ \n           current = malloc(sizeof(Queue));\n           current->contents = dataum;\n           current->next = NULL;\n           return;\n       }\n      while (current->next != NULL){\n         current = current->next;\n      }\n      current->next = malloc(sizeof(Queue));\n      current->next->contents = datum;\n      current->next->next = NULL;\n      return;\n  }\nQueue* dequeue(Queue* head){\n   if (head == NULL){ return head;}\n   Queue* trash = head;\n   head = head->next;\n   free(trash);\n   trash = NULL;\n   return head;\n}\n\nitem_t* top(Queue* head){\n   if (head == NULL){ return NULL; }\n   else {\n      return &head->contents;\n  }\n}
256833
The problem I see with Traversal is that the calls to itself don't have the same number of parameters.  Since you don't seem to be using "mode", you should probably remove it from the function's parameter list.  This should have been fairly obvious from the compiler error messages...\n\nI think the problem with FindMin is that tnPtr was declared a const?  Which means that the while loop can't update it.  This might have also been apparent from the compiler errors...
3692
GCC is a C compiler - if you're writing C++ code, you probably want to use G++, which is a C++ compiler.\n\nTo allocate an array of int's in C++, you can either use the traditional C syntax and malloc()/free() like:\n\nint* intArray = (int*) malloc(10*sizeof(int));\n...\nfree(intArray);\n\nor you can use the C++ new operator and new/delete like:\n\nint* intArray = new int[10];\n...\ndelete[] intArray;
354115
In all programming languages passing by reference will take less memory than others
912485
there is no "code" for it. The compiler evaluates it at the compile time, and replaces with the actual number.\nThere is no way to write a function that would did that at run time, because at run time, there is not type information available - only addresses of variables not their sizes