Search:

Type: Posts; User: Kip Neuhart

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,059

    What is it doing that you don't expect? The first...

    What is it doing that you don't expect? The first problem I stopped reading at is that you call fclose even if the file fails to open.
  2. Replies
    5
    Views
    2,001

    Do you realize that the majority of your...

    Do you realize that the majority of your questions can be answered by reading a manual? Most programmers find it annoying when you ask a question that can be easily answered with a look through the...
  3. Replies
    7
    Views
    1,533

    Yes.

    Yes.
  4. Thread: cygwin

    by Kip Neuhart
    Replies
    1
    Views
    2,109

    I believe that the default for Cygwin only...

    I believe that the default for Cygwin only installs minimal packages. Read the Cygwin FAQ for details on how to install further packages.
  5. Replies
    13
    Views
    33,605

    >error: initializer element is not constant You...

    >error: initializer element is not constant
    You can't call malloc outside of a function. Global initializers must be constant.
  6. Replies
    1
    Views
    1,289

    Use perror instead of printf for more details on...

    Use perror instead of printf for more details on why the file couldn't be opened.


    perror("File could not be opened");

    Most likely the file couldn't be found because it's in the wrong...
  7. Replies
    5
    Views
    977

    This has all the signs of HEADINGMAP not being a...

    This has all the signs of HEADINGMAP not being a type. What does the declaration of HEADINGMAP look like? I was under the impression that you were doing something like this.


    typedef map< string,...
  8. Replies
    9
    Views
    2,657

    getline is overloaded for the string class. ...

    getline is overloaded for the string class.


    string name;
    string address;
    string account;

    cout << "Input suppliers name: ";
    getline(cin, name);
    cout << "Input suppliers address: ";
  9. Replies
    1
    Views
    929

    Assuming pt_ptr is a pointer to a structure that...

    Assuming pt_ptr is a pointer to a structure that defines a y member and actually points to something, and that the y member is an arithmetic type (probably double), yes. It does what you think. But...
  10. Replies
    2
    Views
    887

    >where is the +10 elements coming from? The...

    >where is the +10 elements coming from?
    The pointers of the name array.
  11. Thread: database

    by Kip Neuhart
    Replies
    2
    Views
    1,182

    >But can we write a file in notepad and read it...

    >But can we write a file in notepad and read it from the program?
    Yes, of course. It would be inconvenient indeed if C++'s file I/O only worked on file that was originally written by a C++ program....
  12. Replies
    5
    Views
    977

    This is the best I can do with what little detail...

    This is the best I can do with what little detail you've provided.


    ostream& operator<<(ostream& out, const HEADINGMAP& hmap)
    {
    // Code to write the contents of hmap to out
    return out;
    }
  13. Replies
    7
    Views
    1,533

    Only the result of the expression is checked for...

    Only the result of the expression is checked for the null character. The result of the expression is the value of *s. However, because the expression was assignment, it's a safe bet that *t and *s...
  14. Replies
    13
    Views
    6,845

    >, and ; are both operators No, they're both...

    >, and ; are both operators
    No, they're both tokens. A comma has use as an operator or a punctuator depending on the context, but a semicolon is not an operator, ever.

    >so where is ;(semi colon)...
  15. Replies
    7
    Views
    2,256

    xchat has a Windows build.

    xchat has a Windows build.
  16. Replies
    5
    Views
    4,529

    You want to work through several test cases of...

    You want to work through several test cases of varying complexity. Look for patterns in how one number carries over into the next. This should give you an idea of how to begin developing your...
  17. Replies
    5
    Views
    4,529

    Of course. The num1 vector still contains...

    Of course. The num1 vector still contains integers, you're just using an intermediate step in acquiring them to make life easier. getline reads a line from standard input, and sin converts the...
  18. Replies
    5
    Views
    4,529

    Integers can be compared with character literals....

    Integers can be compared with character literals. The problem is that cin's >> operator is delimited by whitespace. It won't read a newline. A better way to go about this would be to use getline and...
  19. Replies
    14
    Views
    4,836

    >a simple but important difference Well, if you...

    >a simple but important difference
    Well, if you want to get technical linguistically, returning nothing is equally accurate to not returning anything. Anything is defined as "Something or someone...
  20. Replies
    14
    Views
    4,836

    >How can you return nothing? I believe that...

    >How can you return nothing?
    I believe that explaining


    void f(void)
    {
    return;
    }

    and
  21. Replies
    15
    Views
    2,438

    Why not set a pointer to the beginning of the...

    Why not set a pointer to the beginning of the array in main, then pass a pointer to that pointer to findtag. That way you can update the pointer yet still use it in main for your loop test.

    ...
  22. Replies
    14
    Views
    4,836

    How an implementation interprets the standard may...

    How an implementation interprets the standard may vary, though a "function returning void" is accepted terminology for a function with void as the return type and semantics for no return value.
  23. Replies
    14
    Views
    4,836

    It appears that the question was about the...

    It appears that the question was about the concept of returning void as meaning no return value, not about the void keyword in general.
  24. Thread: union

    by Kip Neuhart
    Replies
    2
    Views
    2,124

    Unions are used for reducing storage costs,...

    Unions are used for reducing storage costs, accessing data with different internal representations, and creating a poor man's polymorphism.

    Reducing storage costs entails exactly what you would...
  25. Replies
    1
    Views
    1,735

    This should get you started. int main(void)...

    This should get you started.


    int main(void)
    {
    char again;

    do {
    [...]
    } while (again == 'y');
Results 1 to 25 of 129
Page 1 of 6 1 2 3 4