Search:

Type: Posts; User: Bayint Naung

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Not really, it's not valid. This is not granteed...

    Not really, it's not valid.
    This is not granteed by standard.


    p = array + 1000;
    if( p > array)

    There's no grantee it will work.

    It's already mentioned here.
  2. Replies
    34
    Views
    10,915

    erm, may be I don't get your question at all. If...

    erm, may be I don't get your question at all.
    If you want to delete row from 2D dynamic array.
    Let's say( I'll use quzah's example ;)

    For dynamic 2D array p. (type of p = int **)

    p[0] = ...
  3. sizeof is compile time operator in C89. and in...

    sizeof is compile time operator in C89. and in C99 can evaluate VLA size at run-time.
    Edit:
    As far as I understand, for int a[10] the number of element of part of the type. ie array of 10...
  4. Replies
    3
    Views
    1,390

    Memory Allocation...

    Memory Allocation
    Example how to use realloc() to read arbitrary long line. duh~
  5. Replies
    17
    Views
    9,503

    >>Overloaded operators are functions, so there is...

    >>Overloaded operators are functions, so there is no problem.
    Sure.
    The point is readability and it can cause confusion for maintainers.
  6. Replies
    17
    Views
    9,503

    Wait for C1x they got type generic macro....C1X -...

    Wait for C1x they got type generic macro....C1X - Wikipedia, the free encyclopedia
    There's no easy way to 'fix' side effect.
    Just document not to use side-effect expression when using macro.
    I...
  7. Replies
    17
    Views
    9,503

    An idea which grumpy points out its limitation......

    An idea which grumpy points out its limitation... ;)
  8. reversew.c:(.text+0x62): undefined reference to...

    reversew.c:(.text+0x62): undefined reference to `Strrev'

    Did you just copy/paste the error or type in??! Notice the 'S'trrev
  9. It's unix design. ;) filter through pipe!

    It's unix design. ;)
    filter through pipe!
  10. Stop using .o extension for executable. That...

    Stop using .o extension for executable. That makes me confused!
    If file3 can read from stdin, you could just use pipe.


    prog4 | prog3
    I believe it's even possible to pipe to prog3 and at the...
  11. Replies
    9
    Views
    1,141

    Nothing to do with macro. Data-Type Conversions...

    Nothing to do with macro. Data-Type Conversions
    0xFFFFFFFF may not fit in int, btw.
  12. Replies
    8
    Views
    1,453

    Not this again. Just take these two as 2...

    Not this again.
    Just take these two as 2 different languages.
    And both C and C++ programmers will be happy.
  13. Replies
    10
    Views
    8,634

    It is your responsibility to learn things. It is...

    It is your responsibility to learn things. It is your school/tutor to teach you these things.
    If they don't, you have to ask them.
    Even if you are not student, you could still read online tutorial...
  14. Replies
    1
    Views
    829

    https://computing.llnl.gov/tutorials/pthreads/...

    https://computing.llnl.gov/tutorials/pthreads/
    why not find out yourself??
  15. Replies
    4
    Views
    855

    Your teacher wants you to write expression...

    Your teacher wants you to write expression parser?
    You could use shunting yard algorithm.
    If you are not good at programming, I could guess it would be hard for you. ;)

    >>but if any1 could find...
  16. Replies
    2
    Views
    772

    Question 11.17...

    Question 11.17

    Edit: What! the link and code are not the same....
    stdout is usually line buffered while stderr is not. You can set buffering mode using setvbuf(). or use flush().
    The rest is...
  17. Replies
    7
    Views
    1,138

    I would write something that re-use standard...

    I would write something that re-use standard library rather than re-implementing them first.
    Eg like generic container (list,hash table,tree,etc) or
  18. https://computing.llnl.gov/tutorials/pthreads/...

    https://computing.llnl.gov/tutorials/pthreads/
    Exit main function by calling pthread_exit()
  19. Replies
    8
    Views
    730

    So What's the problem? int...

    So What's the problem?



    int totaltraveltime(float velocity,float angle,float gravity);


    int totaltraveltime(float velocity,float angle)
    {
    duration=...
  20. Of course

    Of course
  21. Replies
    11
    Views
    809

    int main(void) { double f;...

    int main(void)
    {

    double f;
    memset(&f,0,sizeof(f));

    printf("%f\n",f);

    char *p;
    memset(&p,0,sizeof(*p));
  22. Perhaps you could tell us what you are trying to...

    Perhaps you could tell us what you are trying to do.
    All reading functions update the file position.
    Thus eg fgets() will read untill newline or EOF is met and next call will start from where the...
  23. Replies
    5
    Views
    1,817

    Convert and cast have different meaning.

    Convert and cast have different meaning.
  24. Replies
    2
    Views
    1,096

    You might want to strip the newline if any.

    You might want to strip the newline if any.
  25. Replies
    2
    Views
    562

    The code you posted seems ok. Can you post the...

    The code you posted seems ok.
    Can you post the whole code?
    Try to trace the program in debugger.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4