Search:

Type: Posts; User: Just

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,199

    Daved, the example of mine was purely...

    Daved, the example of mine was purely theoretical, made up to explain my question. But your point that avoiding classes that need to end in "Manager" does make sense.

    So, in this theoretical...
  2. Replies
    9
    Views
    1,199

    Thanks for that SlyMaelstrom. While googling on...

    Thanks for that SlyMaelstrom. While googling on this topic, I came across this quote:

    "Challenge any class name that ends in "-er" (e.g. Manager or Controller). If it has no parts, change the name...
  3. Replies
    9
    Views
    1,199

    Help me name a class

    This is just a hypothetical example - I'm just trying to learn how to name classes better.

    Let's say you have a program that (amongst other things) will be required to start and stop other...
  4. Replies
    11
    Views
    7,270

    I think I've finally, FINALLY, figured out what...

    I think I've finally, FINALLY, figured out what was wrong. When I was specifying -L/my/lib/path to g++, in that library path was, I think, a version of libstdc++ that was built using icc not gcc (as...
  5. Replies
    11
    Views
    7,270

    There has to be something very, very strange...

    There has to be something very, very strange going on. I have just created a test library (with just one single line function) using a stripped down version of my g++ command line, and it works fine...
  6. Replies
    11
    Views
    7,270

    Ok, here is the exact call to g++ (just with the...

    Ok, here is the exact call to g++ (just with the library and object names changed to protect the innocent):



    g++ -L/my/lib/path -Wl,-rpath-link /my/lib/path -Wl,-Bdynamic -o executable_name...
  7. Replies
    11
    Views
    7,270

    Okay, the order might be the other way around......

    Okay, the order might be the other way around... but I've still got no idea what the problem is. :( There's a also a few -L/my/library/path options in there (obviously before the -l arguments) but...
  8. Replies
    11
    Views
    7,270

    I don't have the exact command line with me at...

    I don't have the exact command line with me at the moment, but it's pretty standard. g++ -llib1 -llib2 file1.o file2.o...



    When using g++, I don't think you should need to explicitly link to...
  9. Replies
    11
    Views
    7,270

    Perhaps I should have also mentioned that using...

    Perhaps I should have also mentioned that using the STL (and operator new/delete) work fine when I write a trivial hello world program. So there's nothing wrong with my gcc/STL installation or...
  10. Replies
    11
    Views
    7,270

    Problems linking with g++

    I've been trying for over a day now to get my program to compile and link using the g++ (3.4.3) compiler on linux (RedHat). Previously I have used the intel compiler and have had no problems. The...
  11. Replies
    1
    Views
    1,655

    I think I have the answer. TextboxDisplay will...

    I think I have the answer. TextboxDisplay will also be a CDialog (it will inherit from CDialog), and it will be embedded in the parent dialog. This means the message map, DoDataExchange(), etc will...
  12. Replies
    1
    Views
    1,655

    Splitting a dialog up into multiple classes

    Hello,

    I'm in the design phases of an MFC GUI, and I'd really appreciate some help here...

    This GUI is going to contain one dialog that is rather large - it'll contain dozens of controls...
  13. Replies
    4
    Views
    1,627

    I wasn't complaining about dereferencing the this...

    I wasn't complaining about dereferencing the this pointer, I was complaining about dereferencing the variable temp. Was that the problem, CodeMonkey?


    Not from what you've posted - we'd probably...
  14. Replies
    4
    Views
    1,627

    *temp = *this; What's going on here? It looks...

    *temp = *this;

    What's going on here? It looks like temp is an uninitialised pointer to a board, so it's pointing off into space for all we know, and then you dereference it and try to create a...
  15. Replies
    3
    Views
    3,708

    Wow, thanks grib, that's quite impressive. So the...

    Wow, thanks grib, that's quite impressive. So the config file would contain a list of types of widgets, the factory looks up that type of widget in its map and if it finds it, it returns a clone...
  16. Replies
    3
    Views
    3,708

    Abstract Factory pattern

    (I hope that it's okay to ask a question on design patterns here. It's not C++ specific but, well, I plan to implement the pattern in C++, and no other board seemed more appropriate.)

    At the...
  17. Thread: delete NULL;

    by Just
    Replies
    10
    Views
    1,781

    delete NULL;

    I'm pretty sure that doing:



    delete NULL;


    is perfectly safe, and is just a no-op. Yet everywhere I look, I keep seeing code like this:
  18. Replies
    21
    Views
    6,361

    For the popularity/use of common programming...

    For the popularity/use of common programming languages, take a look at:

    http://www.tiobe.com/tpci.htm
  19. Replies
    5
    Views
    1,381

    Both. If you read from a data structure that...

    Both.

    If you read from a data structure that can be written to by another thread, then you must thread guard it. If you write to a data structure that can be read by a different thread, again you...
  20. In case anyone cares, I've just visited Meyer's...

    In case anyone cares, I've just visited Meyer's errata list for Effective STL, and he writes:



    Yes, Meyers, you should! Would have saved me some time!
  21. Thanks again CodePlug. So my guess on what the...

    Thanks again CodePlug. So my guess on what the standard says was correct, but it seems most STL implementations happen to have find() return the first element anyway (even though it's not required)....
  22. Thanks for the reply CodePlug. I think when...

    Thanks for the reply CodePlug.

    I think when Meyers uses the word "first", he means "first in the map according to the order it's sorted", not "first element inserted". This would explain why in...
  23. Multimap question: is find() guaranteed to return the first matching key

    I'm trying to track down a problem in someone else's code. At one spot, find() is used on a multimap like so (i is an int):



    MyMultiMap::iterator matching = myMultimap.find( i );
    while (...
  24. Replies
    21
    Views
    13,342

    But the beauty of this is that actual code...

    But the beauty of this is that actual code doesn't need to be touched at all. Yes, you could comment out the private: line, but that creates other problems. What happens when I check in my unit tests...
  25. Replies
    21
    Views
    13,342

    At first I thought that coding this would be...

    At first I thought that coding this would be absurd, but believe it or not, this actually came in handy today! What could possibly make "#define private public" useful, you ask?

    Unit testing! I...
Results 1 to 25 of 28
Page 1 of 2 1 2