Search:

Type: Posts; User: aijazbaig1

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    3,142

    thnks for the info...seems that the term is a bit...

    thnks for the info...seems that the term is a bit too vague and does not neccesarily mean a pointer to a pointer....go google!!



    So you mean I should instead pass to this function a pointer to...
  2. Replies
    49
    Views
    18,719

    By mallocing the memory and then copying the...

    By mallocing the memory and then copying the string do you mean I should first allocate space for the string and the pass the memory head as a pointer to the function right?

    What exactly do you...
  3. Replies
    17
    Views
    3,142

    thnks for the reply, newptr =...

    thnks for the reply,


    newptr = malloc(newsize);
    if (newptr != NULL)
    {
    memcpy(newptr, oldptr, MIN(oldsize, newsize));
    free(oldptr);
    }
    ...
  4. Replies
    17
    Views
    3,142

    well.. I may have to use C latter in school or...

    well..

    I may have to use C latter in school or my thesis work to handle low level stuff and Ive heard that C is better than C++ on such low level stuff...

    Perhaps isn't such problems intersting...
  5. Replies
    17
    Views
    3,142

    You mean the first time I used the realloc...

    You mean the first time I used the realloc function it allocated for me a part of the memory from the stack and not the heap (as function calls are locally allowed to use resources from the stack...
  6. Replies
    17
    Views
    3,142

    hmmm.. yea it sure is...but then one has to know...

    hmmm..
    yea it sure is...but then one has to know the size before hand...

    but Im trying to experiment with the idea of 'dynamic strings in C' ....I could instead use a bufffer big enough or I...
  7. Replies
    17
    Views
    3,142

    A custom gets function

    Hello there,
    I am trying to implement a custom gets function which would allow me to read a string so as to avaoid the pitfalls associated with the C version of 'gets'.

    Well...I have been able to...
  8. Replies
    49
    Views
    18,719

    well.... they are not the same if you care...

    well....
    they are not the same if you care about the specifics.

    A char pointer is a variable. It can be the lvalue of an expression while the name of an array is a constant. So it cannot be the...
  9. Replies
    49
    Views
    18,719

    strings Vs. Char pointers

    Hello,
    I wanna illustrate the difference between a char array (a string that is) and a pointer to char using a simple function which say capitalizes all the letters of a given string.

    To that...
Results 1 to 9 of 9