Search:

Type: Posts; User: Noir

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    906

    Every function has to be declared first. You can...

    Every function has to be declared first. You can do it yourself if you want, but with standard functions it's like hitting a moving target. That's why we have standard headers. If you include...
  2. Replies
    3
    Views
    906

    int i = s[0]; I think you mean int i = 0;...

    int i = s[0];
    I think you mean

    int i = 0;
    Your code is setting the index variable to whatever value is the first character in the string.

    while( s[i] != '0')
    I think you mean

    while ( s[i]...
  3. Thread: delete last node

    by Noir
    Replies
    4
    Views
    1,385

    Yes. You don't have to worry about any pointers...

    Yes. You don't have to worry about any pointers other than previous->next because you're deleting the last node and don't have to update any back pointers.
  4. Thread: function throw

    by Noir
    Replies
    3
    Views
    1,289

    The first one catches exceptions thrown anywhere...

    The first one catches exceptions thrown anywhere in the function. It's a special syntax designed for the intialization list in constructors. The second one I'm not sure about. I don't think it's...
  5. Thread: data type for hex

    by Noir
    Replies
    3
    Views
    45,546

    unsigned int or unsigned long, I'd guess.

    unsigned int or unsigned long, I'd guess.
  6. Thread: Makes me mad..

    by Noir
    Replies
    12
    Views
    1,957

    Self-improvement isn't a contest. You should only...

    Self-improvement isn't a contest. You should only move at the right pace for you and forget about how fast other people are going. There's always going to be something you don't understand.
  7. Replies
    10
    Views
    949

    Very regularly. I use it to make the intention of...

    Very regularly. I use it to make the intention of my code very clear.

    A conditional flag makes the code harder to follow and negating the condition adds unnecessary and often illogical...
  8. Replies
    9
    Views
    3,639

    That was bad wording on my part. I meant "text...

    That was bad wording on my part. I meant "text stream". Sorry for the confusion.
  9. Replies
    9
    Views
    3,639

    They won't work though. You can't jump to...

    They won't work though. You can't jump to somewhere you haven't been yet and fsetpos() requires a successful call to fgetpos(). The only way to jump somewhere you haven't been is with fseek() and...
  10. Replies
    9
    Views
    3,639

    Why yes, since you asked so nicely. Here's the...

    Why yes, since you asked so nicely. Here's the quote that says fsetpos() won't work because you have to have been to the position first and called fgetpos():

    And here's the quote that says you...
  11. Thread: File Names

    by Noir
    Replies
    19
    Views
    2,448

    Now you're saying something different and still...

    Now you're saying something different and still not being clear. Here's one line:


    c:\mybaby\storm\links.php

    This is the path:


    c:\mybaby\storm\
  12. Thread: gcc and gets

    by Noir
    Replies
    5
    Views
    20,217

    You get a gold star. :) gets() removes the '\n'...

    You get a gold star. :) gets() removes the '\n' from the stream but doesn't store it in the array. The standard tells you that, but you can also test it with a quick program:


    #include <stdio.h>...
  13. Replies
    9
    Views
    3,639

    Nope, you can't do arbitrary seeking on a text...

    Nope, you can't do arbitrary seeking on a text file. It has to be opened as a binary file.
  14. Thread: File Names

    by Noir
    Replies
    19
    Views
    2,448

    Can you describe that a different way? You're...

    Can you describe that a different way? You're getting the file names, but what for? Are you throwing them away or using them? What do you mean by copy the path?
  15. Thread: gcc and gets

    by Noir
    Replies
    5
    Views
    20,217

    Because it's dangerous and shouldn't be used? ;)...

    Because it's dangerous and shouldn't be used? ;) gets() doesn't allow you to stop reading when the array is full, so can end up writing past the end if the array and breaking all kinds of things. Use...
  16. Replies
    42
    Views
    4,724

    I don't believe that. Can you prove it?

    I don't believe that. Can you prove it?
  17. Replies
    15
    Views
    2,148

    You need to return a string instead of a...

    You need to return a string instead of a character.
  18. Thread: need Coding....

    by Noir
    Replies
    13
    Views
    1,272

    I'll make this as simple as possible because you...

    I'll make this as simple as possible because you look like you don't understand what everyone else has told you.



    NO



    Someone please close this thread.
  19. Replies
    7
    Views
    1,783

    Here's some code for cin that encrypts with 3....

    Here's some code for cin that encrypts with 3. You probably want the key to be set once and used for every character instead of a different key for each character. That way you don't have to keep...
  20. Replies
    7
    Views
    1,783

    So what's the problem?

    So what's the problem?
  21. Replies
    4
    Views
    1,055

    Look up strtok(), but I'm not sure that's what...

    Look up strtok(), but I'm not sure that's what you really want. Can you describe your problem a different way?
  22. Replies
    6
    Views
    1,086

    Yeah.

    Yeah.
  23. Replies
    6
    Views
    1,086

    Looks okay. If the list is empty, you add a node...

    Looks okay. If the list is empty, you add a node at the front. If the list isn't empty, you add a node ad the end. I don't think createnode() is good though because it doesn't return an error status...
  24. Thread: Filling an array

    by Noir
    Replies
    18
    Views
    2,189

    Lining things up really only works if the data...

    Lining things up really only works if the data isn't being entered dynamically or if you're only entering one thing at the end of the line like with the id and payrate. You have to hit enter to send...
  25. Thread: Filling an array

    by Noir
    Replies
    18
    Views
    2,189

    _getch() isn't portable, you should be using...

    _getch() isn't portable, you should be using getchar() instead. It doesn't do exactly the same thing, but it's close enough not to matter.

    It makes sure that the message is really printed before...
Results 1 to 25 of 218
Page 1 of 9 1 2 3 4