Search:

Type: Posts; User: Cogman

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Looks like a rounding issue to me. Try going out...

    Looks like a rounding issue to me. Try going out to 3 or decimal places instead of the standard 2.
  2. Replies
    11
    Views
    14,037

    Where are the recommendations for Dev-C++ coming...

    Where are the recommendations for Dev-C++ coming from? I see lots of new C++ programmers that go for it, and I don't really know why.

    Its a Dead IDE, and IMO somewhat buggy.
  3. Thread: Is this valid?

    by Cogman
    Replies
    4
    Views
    1,120

    Does the language standard support its use? Then...

    Does the language standard support its use? Then it is valid. You can use a large portion of C code in the C++ language, it is still valid. It might be considered inelegant, but not invalid.
    ...
  4. Replies
    6
    Views
    4,561

    Actually there are a couple of free PDF...

    Actually there are a couple of free PDF libraries. However, I don't know about doc.

    PoDoFo is the one I've liked the best, though GNUPdf looks like it might show some promise.
  5. Replies
    20
    Views
    8,111

    Not so true. Display lists still have significant...

    Not so true. Display lists still have significant CPU->GPU data transfer going on with each draw. While display lists are faster then the begin/end pairs, they still slower then VOBs (well, ok, this...
  6. Replies
    9
    Views
    2,839

    NP. One thing that I did confuse when I was...

    NP. One thing that I did confuse when I was posting was the fact that somehow my brain triggered binary searching from your post. So, when I was saying it could be done simply, and iteratively, I was...
  7. Replies
    9
    Views
    2,839

    Dang it, I just had a long post saying you were...

    Dang it, I just had a long post saying you were right, and somehow my cookies got cleared :(.

    Anyways, the gist of it was "You were right, I didn't understand what was being said, and I prefer a...
  8. Replies
    26
    Views
    2,462

    Just a small note, I do agree with pretty much...

    Just a small note, I do agree with pretty much everything that you've said. Just note that the use of AND, NAND, and NOR gates for high performance parts (CPUs) is generally minimized. Just like...
  9. Replies
    9
    Views
    2,839

    Not for this, you can do binary searching without...

    Not for this, you can do binary searching without using recursion, and just as clean as recursion. The overhead of recursion is pretty bad.

    Recursion should be reserved for splitting data, IE,...
  10. Replies
    26
    Views
    2,462

    :), There is no difference in the way a library...

    :), There is no difference in the way a library function is written and the way you write your own personal functions. Header files are filled with function prototypes.
  11. Replies
    9
    Views
    2,839

    AVL tree - Wikipedia, the free encyclopedia...

    AVL tree - Wikipedia, the free encyclopedia
    Red-black tree - Wikipedia, the free encyclopedia

    Start with the AVL tree, as it is probably the simplest form of tree balancing. Go to the Red-black...
  12. Replies
    26
    Views
    2,462

    programming without functions is near impossible....

    programming without functions is near impossible. You would essentially have to write an entire OS with each program (doesn't that sound like fun?)

    There is no printf, no cout, no math function,...
  13. Replies
    9
    Views
    3,085

    I've ran into issues where just doing #ifndef...

    I've ran into issues where just doing #ifndef blocks in the header doesn't quite cut it.

    Rather, in the header do extern const <datatype> variablename, and in a second cpp globals file do all your...
  14. Replies
    11
    Views
    2,035

    The solution that you want is going to somehow...

    The solution that you want is going to somehow break down to using an array (though, if the numbers only go from 1 -> 10, you could use an int.)

    You'll want to save off that a number had been used...
  15. Replies
    5
    Views
    4,503

    For this problem, (as I don't think you want all...

    For this problem, (as I don't think you want all paths, which dijkstra's Algo solves), A* would be the best solution. Check out Cornered Bee's link and the external links on it for some pretty good...
  16. Replies
    13
    Views
    10,639

    You're missing the point completely. if a goto...

    You're missing the point completely. if a goto will make the function more iterative, then you can do the same thing with a while loop and variables. If you don't need the variables from more then...
  17. Replies
    13
    Views
    10,639

    Recursive functions have pretty big overhead...

    Recursive functions have pretty big overhead compared to iterative methods. The best way to increase speed is to see if it is possible to convert the function into an iterative loop instead of a...
  18. Replies
    13
    Views
    7,329

    If you don't want the extra include, the other...

    If you don't want the extra include, the other (MS visual studios specific) way of turning a c-string into a LPCWSTR is by putting an L in front of it. So LoadLibrary(L"theDll.dll"); should work.
  19. Replies
    15
    Views
    7,037

    if you have a function, that doesn't affect the...

    if you have a function, that doesn't affect the object, then I would pull it out of the object. If it is related to the object and you want that to be clear, then I would put them in the same name...
  20. Thread: perfect number

    by Cogman
    Replies
    9
    Views
    3,720

    It depends on how you have to display it. As...

    It depends on how you have to display it.

    As was stated, you are already finding factors, so storing the found factors in an array/vector for later display would be the route that I would take....
  21. Replies
    19
    Views
    8,973

    the difference is in the iostream library and...

    the difference is in the iostream library and every library that it links to. With the stdio library, you are linked to a limited set of functions, with the iostream library, you are linked to...
  22. Replies
    13
    Views
    20,488

    Or your building an API (no templates for APIs)....

    Or your building an API (no templates for APIs). Threading is another place where void*'s are pretty much unavoidable.
  23. Thread: Thread

    by Cogman
    Replies
    10
    Views
    1,308

    Meh, I guess using something just because it is...

    Meh, I guess using something just because it is object oriented doesn't really do it for me.

    Yes some of the locking features are nice, like scope lock, ect. But a well placed mutex will perform...
  24. Thread: Thread

    by Cogman
    Replies
    10
    Views
    1,308

    If portability isn't a concern, then...

    If portability isn't a concern, then multithreading using the native OS threading system is much easier, IMO, then getting a working build of boost going. It will also lead to a smaller, faster,...
  25. Thread: Thread

    by Cogman
    Replies
    10
    Views
    1,308

    For linux you'll want to use pThreads. When you...

    For linux you'll want to use pThreads. When you compile make sure that you use -lpthread .
    There are lots of tutorials on how to use pthreads, just google it up. pthread_create is the function that...
Results 1 to 25 of 64
Page 1 of 3 1 2 3