CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: JohnW@Wessex

Page 1 of 5 1 2 3 4

Search: Search took 0.17 seconds.

  1. Replies
    6
    Views
    486

    Re: Violating C++ Standard?

    Also be aware that sometimes compilers will initialise variables when in 'debug mode' but leave them untouched when in 'release mode'.
  2. Replies
    10
    Views
    561

    Re: General Object-Orientated Question

    Don't try to second guess the compiler.

    I once wrote a set of image container classes with associated iterators. The iterators were based on a class heirarchy about four levels deep, with the base...
  3. Replies
    0
    Views
    174

    autoexp.dat rule not running

    I have a template defined thus...


    namespace stdi3
    {
    template <typename T, const size_t MAX_SIZE>
    class fixed_vector
    {
    private:
  4. Replies
    13
    Views
    620

    Re: TR2 file library

    Well, actually, I'd much prefer a system were adding a path or string to a path would add the path separator, unless the string was already prefixed/postfixed with the separators.

    If you want to...
  5. Replies
    13
    Views
    620

    Re: TR2 file library

    What other languages use is of no concern to me. It's what the 'conventions' are for C++ that matter.

    Maybe, maybe not, but STL strings have been around for a long long time and the slight...
  6. Replies
    13
    Views
    620

    Re: TR2 file library

    Whilst I agree that, in a couple of instances, there are operators who's meaning in certain contexts have become canonical (and with '+' for strings I don't think it was a particularly great mental...
  7. Replies
    13
    Views
    620

    Re: TR2 file library

    But that's my point. When you look at the operator your first thought will be "how would the canonical understanding of this operator apply to this context". It just doesn't work for '/'.



    The...
  8. Replies
    13
    Views
    620

    Re: TR2 file library

    I don't see that '+' would be a problem in this case.
    You are adding a path to a path and a string to a path. This would be surely be accomodated by overloads of the '+' operator.


    std::path...
  9. Replies
    13
    Views
    620

    Re: TR2 file library

    I don't disagree that there is a logic behind choosing the '/' operator, it's just that you could come up with 'logical' uses for overloaded operators for all sorts of things. I did it in the past...
  10. Replies
    13
    Views
    620

    TR2 file library

    I've been reading up on an introduction to the TR2 file system library in Visual Studio 2012.

    I can't say I was very impressed by choice of using the '/' operator to concatonate file paths.
    It...
  11. Replies
    5
    Views
    382

    Re: C++ templates without arguments

    The template parameter doesn't even have to be a type.

    Here's a template with a non-type parameter, with defaults.


    template <const size_t SIZE = 1024>
    class FixedLengthContainer
    {

    };
  12. Replies
    5
    Views
    382

    Re: C++ templates without arguments

    It doesn't for me.



    This does compile. Are you sure you didn't mean this?


    template<typename T = int>
    class abc
    {
  13. Replies
    7
    Views
    534

    Re: Windows strcpy overflow question

    I'm assuming that you're asking this question to understand legacy C code.

    As you are using C++, the equivelent code in your first example would be.


    #include <iostream>
    #include <string>
    ...
  14. Re: I wrote this programe for circular singly linked list but its not adding nodes to

    When people try to debug linked lists, my advice (along with stepping through with the debugger) is to get pencil and paper out and draw the sequence of node connections you expect to see when a...
  15. Re: How to convert an float into a std::string?

    Did you include <string> ?
  16. Replies
    7
    Views
    620

    Re: matrixarray

    Yes, that's the way I'd approach it.
  17. Re: Initializing A Vector Of Vectors Of Strings

    Would std::array be a happy compromise?
  18. Replies
    4
    Views
    536

    You know you're getting old when...

    The motorcycle that you once bought new is now featured in 'Classic Bike'.
  19. Replies
    25
    Views
    1,085

    Re: Best Variable to Use

    If you think you can determine the efficiency of a piece of C++ code just 'by looking' then you should maybe read this.
    ...
  20. Replies
    9
    Views
    679

    Re: Final Class in c++

    It's to do with this bit.

    "the most derived class's ctor needs to directly call the virtual base class's ctor"

    Only 'Fred' can do this as it is a 'friend'. It is private to all other derived...
  21. Replies
    9
    Views
    679

    Re: Final Class in c++

    The key line is in the article.

    "Class Fred can access FredBase's ctor, since Fred is a friend of FredBase, but no class derived from Fred can access FredBase's ctor, and therefore no one can...
  22. Javascript is in use by advanced civilisations

    I was watching a repeat of "Stargate SG1 - Ark of Truth" last night when I noticed that the source code of the 'Replicators' created by the Asgard computer bore an uncanny resemblance to Javascript....
  23. Replies
    3
    Views
    459

    Re: reading a file to a vecto/struct

    Pity we can't see the original question any more.

    It's not considered good etiquette to erase your earlier posts from a thread.
  24. Replies
    2
    Views
    446

    Re: Function not executing cin-statement

    Not here it doesn't.

    BTW the function 'getName' doesn't.
  25. Replies
    2
    Views
    446

    Re: Function not executing cin-statement

    warning C4700: uninitialized local variable 'third' used
    warning C4700: uninitialized local variable 'second' used
    warning C4700: uninitialized local variable 'first' used
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width