Search:

Type: Posts; User: Agrajag

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,913

    You havn't looked very hard. Borland,...

    You havn't looked very hard. Borland, DGJPP(which uses gcc for windows/dos programs), MSVC++, and a few others all have options you can flag to get full ANSI Compliance.... it is only as simple as...
  2. Replies
    9
    Views
    1,913

    I meant strictly conforming... anyways I said...

    I meant strictly conforming... anyways I said that it wasn't the easiest or necessarily the desired method of approach, I was only listing it amoung the options. Good point though...
  3. Thread: using free()

    by Agrajag
    Replies
    17
    Views
    2,860

    No worries :D

    No worries :D
  4. Replies
    28
    Views
    3,253

    Make sure you remember to check the return value...

    Make sure you remember to check the return value of fopen() which returns NULL if the file cannot be opened. As far as I have noticed the best way to do it is like the others said, fread() and...
  5. Replies
    6
    Views
    1,724

    When using classes you have to allocate them with...

    When using classes you have to allocate them with the new keyword or the constructor is not called and you have to delete them not free them or the deconstructor is not called.
    Also I wouldn't begin...
  6. Thread: using free()

    by Agrajag
    Replies
    17
    Views
    2,860

    Um... I don't think I missed any point. I wasn't...

    Um... I don't think I missed any point. I wasn't trying to prove or disprove anyone, I was just posting what the standard said about the functions to clear up and misconceptions people had about...
  7. Replies
    5
    Views
    2,301

    Oh dear CeeCee, now I have to change my quote :p...

    Oh dear CeeCee, now I have to change my quote :p

    I didn't really read this post that much, so if what I say has already been said sorry. If by deleting a pointer you mean freeing the memory that...
  8. Thread: using free()

    by Agrajag
    Replies
    17
    Views
    2,860

    7.14.3.1 The calloc function Synopsis...

    7.14.3.1 The calloc function

    Synopsis

    [#1]

    #include <stdlib.h>
    void *calloc(size_t nmemb, size_t size);

    Description
  9. Replies
    2
    Views
    1,160

    It isn't portable so you will have to check your...

    It isn't portable so you will have to check your compiler's documentation, but you can use spawn() or execl() to spawn a child process or just run another program then exit... it is a little lengthy...
  10. Replies
    9
    Views
    1,913

    Hmm... C99 is hardly a "basic definition." It...

    Hmm... C99 is hardly a "basic definition." It defines the whole C language. It dictates how C acts and how compilers should act. C99 is ANSI C, so I find it strange that you say C99 or ANSI C. ...
  11. Replies
    6
    Views
    1,673

    Hmm... I never knew that only linux programmers...

    Hmm... I never knew that only linux programmers knew how to compile source code. How do we windows users ever manage?
    :rolleyes:
  12. Replies
    3
    Views
    1,118

    Although it is not portable C your compiler may...

    Although it is not portable C your compiler may support the findfirst() and findnext() function. Look in your compiler documentation for examples of usage... it would make things alot easier than...
  13. Replies
    3
    Views
    1,883

    There is no C routine to do this, but you could...

    There is no C routine to do this, but you could /easily/ write your own....
  14. Replies
    8
    Views
    1,706

    If you don't like the newline at the end of your...

    If you don't like the newline at the end of your fgets() aquired strings here is a function to handle them

    int remNL(char *s)
    {
    char *p;

    p=strchr(s, '\n');
    if(p==NULL)
    {
    ...
  15. Replies
    34
    Views
    4,417

    To Quzah: I wasn't trying to explain anything...

    To Quzah:
    I wasn't trying to explain anything to /you/ multiple times, I meant to say that I was trying to explain it to him and so were you, not that I was trying to explain it to you and him. ...
  16. Replies
    10
    Views
    2,065

    beely while system("cls") may work in dos or...

    beely while system("cls") may work in dos or windows, linux uses the command clear, so cls will not work in linux. Also system takes a very long time to call, and it would be significantly faster to...
  17. Replies
    13
    Views
    2,848

    Another way to jump would be to use longjmp(), at...

    Another way to jump would be to use longjmp(), at least then you have to include the jumping header file, thus warning anyone using your code that there are jumps. It is a little messier though and...
  18. Replies
    8
    Views
    7,101

    MD5 0wnz j00 also don't use simple substitution...

    MD5 0wnz j00
    also don't use simple substitution ciphers for reasons that won't fit in this board., Also don't use simple xor encryption.... *shudders*
  19. Replies
    8
    Views
    1,581

    ARGH! You should be slapped! void main(void)??!...

    ARGH! You should be slapped! void main(void)??! That blinds me. Not only is this horrible C, but any self-respecting ANSI compliant C++ compiler will not allow you to compile this AT ALL! (Not VC++...
  20. It is compiler specific, some don't include it at...

    It is compiler specific, some don't include it at all. Not only is the asm keyword compiler specific, asm is platform specific. Not a good thing for portable programs.
  21. Thread: cin.getline

    by Agrajag
    Replies
    11
    Views
    4,945

    Hey I can solve the whole thing with only 1...

    Hey I can solve the whole thing with only 1 function.

    char *fgets(char *buf, size_t len, FILE *stream);

    e.g.

    fgets(myarray, sizeof myarray, stdin);

    doesn't leave the \n character in the...
  22. Replies
    34
    Views
    4,417

    Nick I have never heard that, but it makes a...

    Nick I have never heard that, but it makes a little sense. Do you have a reference to prove that though?
    And omakoo you are missing the point entirely, but I will give it a rest because I have...
  23. Replies
    10
    Views
    2,065

    There is no way in ANSI C to clear the screen,...

    There is no way in ANSI C to clear the screen, because it would be horrible for ANSI to assume that the computer you are compiling C for even has a screen. Just think about it... how many mainframes...
  24. Replies
    13
    Views
    2,848

    It is perfectly legal to use goto, and in some...

    It is perfectly legal to use goto, and in some situations it may be desired. I don't use it for 2 reasons:

    1.) I like to think of better ways to do things than spaghetti code. It I wanted that I...
  25. Replies
    3
    Views
    2,573

    I didn't read past void main() :eek: 1.) Why...

    I didn't read past void main() :eek:

    1.) Why does AccessGranted() return void? How is the rest of your program to know that access was granted? :rolleyes:

    2.) You should be slapped for using...
Results 1 to 25 of 26
Page 1 of 2 1 2