Search:

Type: Posts; User: chambece

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,277

    So do you want to echo it as you type, or once...

    So do you want to echo it as you type, or once return is pressed? Does is need to be a single repeated char? eg if you entered rrrrrrrrrssssssssss what would you expect? rrrrrrrrtssssssssst ?
  2. Replies
    8
    Views
    1,294

    Yeah, that is what I was thinking, so therefore...

    Yeah, that is what I was thinking, so therefore as it's a pointer to the heap, returned from malloc I wouldn't have thought it would have been 'wild'; not much use, certainly, but not 'wild'

    As...
  3. Replies
    8
    Views
    1,294

    Thanks, I'm using gcc 2.95.3 on solaris 9,...

    Thanks,

    I'm using gcc 2.95.3 on solaris 9, with Insure++

    The line it is reporing the error on is



    if ( ( tsites=malloc(number_of_sites*sizeof(IndexEntry)) )!=0 )
  4. Replies
    8
    Views
    1,294

    Return values from malloc

    Hi,

    I've just been looking at the man page for malloc as I was investigating a memory related problem and noticed the following that was relevent

    If size, nelem, or elsize is 0, a unique...
  5. Yeah,Thanks guys..... I've left it for the...

    Yeah,Thanks guys.....
    I've left it for the moment, but a more fully fledged version is on the todo list....

    Thanks again
  6. As I mentioned in my previous post, this isn't ...

    As I mentioned in my previous post, this isn't meant to be a 'new implementation of printf' hence my function not being called main!

    I know that what is being passed to me are strings and strings...
  7. Thanks for your post quzah, although..... I've...

    Thanks for your post quzah, although.....

    I've been having a look at the lib code for stdarg.h and come up with the following solution:

    As I'm only looking for something to print strings, it...
  8. Replies
    13
    Views
    1,334

    Yes, it is, but you only have a pointer to one,...

    Yes, it is, but you only have a pointer to one, not an actual one



    struct menuDetail *menuRecPtr; // ponter
    struct menuDetail menuRec; // real one!


    If you use this, you'll have to go...
  9. Replies
    13
    Views
    1,334

    You beat me! If you drop the pointer (*) on...

    You beat me!

    If you drop the pointer (*) on where you declare MenuDes, and go back to using the . operator without dereferencing it, you should be OK......

    ie


    fprintf(fpout2," %s %s...
  10. Replies
    13
    Views
    1,334

    You can also use -> eg fprintf(fpout2,"...

    You can also use ->

    eg


    fprintf(fpout2," %s %s \n",menuRec->MenuDes0,menuRec->MenuNam0);
  11. Replies
    13
    Views
    1,334

    That's because it's now convering a char* to an...

    That's because it's now convering a char* to an array of char * (your structure)

    When you refer to your strucure like that, you are refering to the first element in your structure, it's probably...
  12. Replies
    13
    Views
    1,334

    What are you trying to copy into into menuRec? ...

    What are you trying to copy into into menuRec?

    you need to refer to an char* element of the array, as you do on the following line....
  13. Converting a argc / argv construct into a va_list

    Hi

    I'm new here, so appologies for my first post being a request!!

    I was wondering if anyone can help, I want to write a piece of code that converts an argc / argv to a variable argument list....
Results 1 to 13 of 13