Search:

Type: Posts; User: Shmulik

Search: Search took 0.01 seconds.

  1. Replies
    23
    Views
    4,612

    It would help if you'd put the decalaration of...

    It would help if you'd put the decalaration of all variables and types in your code.
    E.g. - what is searchVal and what is a linked-list item looks like?
  2. If you posted the compiler error - it was a great...

    If you posted the compiler error - it was a great help.

    My guess is that maybe c or c.affects are const, and therefor, their iterator is const_iterator.

    But please send the exact compiler error...
  3. Replies
    23
    Views
    4,612

    Well VC++ is the tool we have - for good and for...

    Well VC++ is the tool we have - for good and for bad.
    My code should also be ocmpiled on various Unix platforms, so I need to conform to "some" standard.

    Hey, how did you become a member?
  4. Replies
    23
    Views
    4,612

    I haven't yet saw an IDE even try to compete with...

    I haven't yet saw an IDE even try to compete with VC++.
    I admint I didn't try t oexplore all IDEs on unix X windows..., but I suspect even there, nothing compares VC++, espacially when it is with...
  5. Replies
    23
    Views
    4,612

    well, you do have a point ergarding why it is...

    well, you do have a point ergarding why it is good to return a const object, but regarding the standard, we both don't know it, so I'm not sure GNU ++ is better then VC++.
    According to VC++ message...
  6. Replies
    9
    Views
    3,965

    What is high_limit definition?

    What is high_limit definition?
  7. Replies
    23
    Views
    4,612

    well, I don't have the official ANSI standard,...

    well, I don't have the official ANSI standard, but from what I found in the net and my books about it, I think Eckel is wrong by saying (in page 284, first edition) that temporary objects are...
  8. Replies
    23
    Views
    4,612

    Do you have any proof that "temporary objects are...

    Do you have any proof that "temporary objects are const according to ANSI C++ standard"?

    Anyone lese have heard about it?
    I can't see any reason why it should be that way.
  9. Replies
    23
    Views
    4,612

    why can the returned object be an l-value?...

    why can the returned object be an l-value?
    suppose the class has a non-const method that evaluated a value and output it, why shouldn't we allow a syntax like
    (sp1+sp2).EvalAndOutput() ?

    since...
  10. Replies
    23
    Views
    4,612

    if you return an object adn not a reference, it...

    if you return an object adn not a reference, it doesn't have to be const.
  11. Replies
    7
    Views
    989

    yeah, me too :( well to solve that - if you're...

    yeah, me too :(

    well to solve that - if you're not sure if your static memeber will be used in static objects, I'd use an inline method as you suggested.
  12. Thread: Variables

    by Shmulik
    Replies
    6
    Views
    1,083

    this code is actually C++ - it uses cin, cout,...

    this code is actually C++ - it uses cin, cout, new and delete.
    The only thing "C" about it is printf.
    lookup printf in your documentation.

    what this lines mean is to print a string. the first...
  13. Replies
    7
    Views
    989

    If you define the static outside the class it...

    If you define the static outside the class it should have no impact on performance. It is surely better then a function (even inlined).
    Static objects are intialized once durint program startup.
    ...
  14. Replies
    7
    Views
    989

    as mentioned above you should make it a static...

    as mentioned above you should make it a static member.
    However the code you wrote won't compile. static memebers are declared inside the class, but should be defined outside of hte class definition....
  15. Replies
    10
    Views
    1,313

    seems fine, except that you forgot to delete...

    seems fine, except that you forgot to delete pPerson
  16. Replies
    3
    Views
    880

    I suggest you show us a piece of you code that...

    I suggest you show us a piece of you code that wirtes over the file, and we'll correct it to appending to the file...
  17. most operating system has a term called "return...

    most operating system has a term called "return value", meaning that when a process is terminated, it returns a value, also called an error code. this is the normal way for the process to let the OS...
  18. Replies
    10
    Views
    1,313

    If you lookl at your code, you can see that...

    If you lookl at your code, you can see that person, person1 and person2 are defined in the funcion main(), this means that the methods civInfo(), govInfo() & milInfo() knows nothing about them.
    But,...
  19. That's the beuty of C++ and the STL - if it...

    That's the beuty of C++ and the STL - if it doesn't compile, you missed a requirement. look at your compiler output, and correct your class accordingly.
  20. Thread: Variables

    by Shmulik
    Replies
    6
    Views
    1,083

    Not sure? New / delete are much better in this...

    Not sure?
    New / delete are much better in this area than malloc, because you don't even have to case.
    simply use:

    class MyClass {
    ...
    }

    int x = GetCount();
    MyClass* list = new MyClass[x];
  21. Thread: work it out

    by Shmulik
    Replies
    1
    Views
    808

    Well, let's see: Say you have- Result r; ...

    Well, let's see:

    Say you have-

    Result r;

    So the first first student would be:

    r.students[0]
  22. Use erase() instead of clear() . I don't know...

    Use erase() instead of clear() .

    I don't know where your book took it, but in STL, the efficient way to clear a string is theString.erase();
  23. Replies
    3
    Views
    993

    Use erase() instead of clear()

    I don't know where your book took it, but in STL, the efficient way to clear a string is theString.erase();
Results 1 to 23 of 23