Search:

Type: Posts; User: CodeMonkey62

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    47,475

    Perhaps they needed time to think about it ?

    Perhaps they needed time to think about it ?
  2. You are missing a semi-colon from after the...

    You are missing a semi-colon from after the closing brackets of your sample class
  3. Replies
    12
    Views
    1,265

    That was my point really. The code looks...

    That was my point really. The code looks reasonable (I'm not sure that I'd test for "this" being null personally, it should never be). It could do with some better formatting too.
  4. Replies
    12
    Views
    1,265

    I would agree that you should use the STL,...

    I would agree that you should use the STL, unless it is an exercise in writing a linked list (something I was asked to do in a job interview last week BTW).

    Out of interest, in the container...
  5. std::string is an STL class, so should not be a...

    std::string is an STL class, so should not be a problem. You would probably have to include the header

    #include <string>
  6. Try using STL strings string str1; cin...

    Try using STL strings



    string str1;

    cin >> str1;
    str1 += ".txt";
    cout << str1 << endl;
  7. Replies
    4
    Views
    1,064

    :) I gather an infinite number of us, given an...

    :)

    I gather an infinite number of us, given an infinite number of compilers could write a half-decent "Hello world" program.
  8. Replies
    4
    Views
    1,064

    Depends what you want to do with it, but the...

    Depends what you want to do with it, but the easiest thing it to use an STL vector of strings.

    std::vector<string> myVev.

    Then you can add, remove, sort or whatever else you might want to do.
  9. Replies
    11
    Views
    1,232

    Well, your points are all being created outside...

    Well, your points are all being created outside the poly class, all you are doing is collecting them together to pass in a single, variable sized container. If you want your class to have copies of...
  10. Replies
    11
    Views
    1,232

    Yes, and sorry, I should have mentioned the...

    Yes, and sorry, I should have mentioned the reference passing, we don't want any unecessary copying, now, do we.
  11. Replies
    11
    Views
    1,232

    Can you not pass a container of points into the...

    Can you not pass a container of points into the constructor. Unless I am missing the point, I would add a number of points to e.g. a STL vector, format

    std::vector<point> myVec;

    (assuming...
  12. Replies
    6
    Views
    1,730

    Any clues ? Are they compilation errors or...

    Any clues ? Are they compilation errors or run-time ?
  13. Replies
    7
    Views
    2,898

    Is Windows I'm afraid, although the Umbrello...

    Is Windows I'm afraid, although the Umbrello sounds rather useful.

    I am qute capable of working through this code, I have nearly 30 years of prograaming experience, it just occurred to me that...
  14. Replies
    7
    Views
    1,066

    It's the difference between changing the address...

    It's the difference between changing the address in memory that you are looking at, and changing the VALUE of the thing at the pointer address.
    E.g. For your first example, say, your pointer pInt is...
  15. Replies
    3
    Views
    1,317

    It's "de-referencing" a pointer. You have a...

    It's "de-referencing" a pointer. You have a pointer pointing at a location in memory, to access the thing it is pointing to, you need to de-reference it.
  16. Replies
    7
    Views
    2,898

    Actually, having had a little play, the Class...

    Actually, having had a little play, the Class View in Studio does approach something like what I wanted, but I was picturing something in diagramatic form. Never mind.
  17. Replies
    7
    Views
    2,898

    I just have a feeling that I have come across...

    I just have a feeling that I have come across something like this at some time, I have a vague picture in my head. Must have been within a tool I have used somewhere, and the only things that come to...
  18. Replies
    7
    Views
    2,898

    Code flow analyzer

    Just curious. Just started to look at some C++ code that I am not familiar with, and it occurs to me that what would be really useful, would be a tool that reversed engineered the code into a method...
Results 1 to 18 of 18