Search:

Type: Posts; User: Dave11

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    763

    I think that the point of Decorator pattern is to...

    I think that the point of Decorator pattern is to add functionality on runtime as opposed to inheritance, which is a compile-time determined behaviour.
    If you ask me, it's kinda fancy and complex...
  2. Replies
    2
    Views
    559

    Bitwise operators

    I've being playing a bit with unicode encoding and decoding.
    I wanted to write a function which gives the number of bytes a character takes from a leading byte in UTF8 encoding.

    so if the byte...
  3. Replies
    47
    Views
    4,914

    Well, let's think a minute on what you want. you...

    Well, let's think a minute on what you want.
    you want to mark the pointer for when it's occupied, when it's freed and when it points to some boundry:

    so when the pointer is null - it's free....
  4. Replies
    47
    Views
    4,914

    good for them. there are better ways of doing...

    good for them. there are better ways of doing things.
  5. Replies
    47
    Views
    4,914

    You don't set the pointer to some random data,...

    You don't set the pointer to some random data, even if you give that random human meaning.
    pointers should either point to legit - living variables or to null. that's it.
    when you're doing...
  6. Replies
    47
    Views
    4,914

    you don't need to call new and the destructor ,...

    you don't need to call new and the destructor , they are called automatically.

    when your class contain inner objects, their constructor is called automatically on the constructor of the object...
  7. Replies
    24
    Views
    2,833

    Stay away from MFC like fire. The original...

    Stay away from MFC like fire.

    The original problem with Windows programing back then was that the API (WinAPI) was no intuitive enough. you really programmed something only make sense to the OS...
  8. Replies
    7
    Views
    1,469

    Well, as aside to my C++ stuff at work, I also...

    Well, as aside to my C++ stuff at work, I also (obligated) to do many Node.js stuff, so yeah, I work with JS on daily basis.
    even in JS world mixing unrelated types on an array is a bad thing,...
  9. Replies
    7
    Views
    1,469

    you can mix std::vector with "Any" class, this...

    you can mix std::vector with "Any" class, this will give you proto-JS-arrays.

    question being asked, why the hell would you want something like it?
  10. Replies
    16
    Views
    2,896

    you may want to switch to standard C++11 threads...

    you may want to switch to standard C++11 threads .
    with your original function signature, the code would easily turned into



    thread = std::thread(processFile,sFilePath);
  11. Replies
    3
    Views
    3,311

    (I'm having a deja-vu here) you code is terribly...

    (I'm having a deja-vu here)
    you code is terribly C-like. all of the functions you wrote should be some member functions. you should have a "Tree" class which inserts "Node" objects. both "Tree" and...
  12. Replies
    92
    Views
    7,300

    Again, back in 2002, C++ defenitly was the...

    Again, back in 2002, C++ defenitly was the dominating language. other languages did make their share out of the interest - cake. so yes, the interest in C++ has decresed but so for Java and PHP. this...
  13. Replies
    92
    Views
    7,300

    I don't think we see the same thing. curently...

    I don't think we see the same thing.
    curently C++ is number 3 as of October 2015. it was ranked 4 last year's October.
  14. Replies
    92
    Views
    7,300

    yes, so what? other languages bit a chunk of...

    yes, so what? other languages bit a chunk of interest along the years. but still, C/C++ stayed on top for a decade, and they move up and down along the years, but never one-way down.
  15. Replies
    92
    Views
    7,300

    You can also look at TIOBE Index: TIOBE...

    You can also look at TIOBE Index:

    TIOBE Software: The Coding Standards Company

    Tiobe is a site which rates popularity of programing languages according Search-Engines statistics.
    as you can...
  16. Replies
    92
    Views
    7,300

    "Smart pointers don't magically make C++ safe....

    "Smart pointers don't magically make C++ safe. The safety objection to C++ still applies."

    -No language is 100% memory safe. in higher languages you get null pointer exception because every...
  17. Thread: Containers

    by Dave11
    Replies
    29
    Views
    2,920

    I wrote the * on top of 1.5 because I wanted to a...

    I wrote the * on top of 1.5 because I wanted to a comment ("on MSVC++") but I missed that.

    and about reserve - I'm talking about extremly big vector size, like <1000 elements, for example.
  18. Replies
    92
    Views
    7,300

    since C++ is maybe the only language that allows...

    since C++ is maybe the only language that allows you touch memory and the operating system directly while giving you the possiblity to write Object-Oriented code mixed with smart meta-programing I...
  19. Thread: Containers

    by Dave11
    Replies
    29
    Views
    2,920

    well, yes, accademically speaking. std::vector...

    well, yes, accademically speaking.
    std::vector has some optimizations tricks deep inside like expanding the capacity by 1.5* when reallocation happens, and many more.
    and also, seasoned C++...
  20. Thread: Containers

    by Dave11
    Replies
    29
    Views
    2,920

    well, even though theoratically std::list should...

    well, even though theoratically std::list should be faster than std::vector, in practice this theory breaks down.

    std::vector is contiguous, which gives it the following features vs. std::list:...
  21. Replies
    92
    Views
    7,300

    Going back to the original answer - you will find...

    Going back to the original answer - you will find these behaviour in every programing language forum.
    Stack overflow downvote trivial qustion so Stack overflow stays "Professional-oriented" Q/A...
  22. 1. if we are to limit ourself to what the...

    1. if we are to limit ourself to what the standard provides us,
    the most clever program we could write is a multi-threaed console
    application which reads and writes to files.

    C++ is the...
  23. and use a thread pool instead of launching...

    and use a thread pool instead of launching threads irresponsibely.
  24. Replies
    6
    Views
    784

    So it's UB. ok, I see. thanks.

    So it's UB. ok, I see.
    thanks.
  25. Replies
    6
    Views
    784

    you convinced me on the first. about the...

    you convinced me on the first.

    about the second, I'm just thinking logically:
    usually , the compiler breaks down a class to C-struct + the methods that are now global and also accepts 'this'...
Results 1 to 25 of 241
Page 1 of 10 1 2 3 4