Search:

Type: Posts; User: Sorensen

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    5
    Views
    2,242

    As SilentStrike has stated use templates; then if...

    As SilentStrike has stated use templates; then if you want to ensure that something is done when you use the function with a specific type, create a specialisation.
  2. Replies
    1
    Views
    1,838

    What do you mean by difference? One runs on a...

    What do you mean by difference? One runs on a standalone PC and the other runs across a network. If you want to know the differences involved in creating them then maybe a search engine or book may...
  3. Replies
    5
    Views
    2,242

    >I have to make sure the pointer points to a...

    >I have to make sure the pointer points to a valid instance of any class that is derived from an abstract base class.

    Then you shouldn't be using a void pointer. Use a pointer to the base class.
  4. Replies
    2
    Views
    1,885

    Yes if you insert an assignment operator after...

    Yes if you insert an assignment operator after the subscript.
  5. Replies
    1
    Views
    1,032

    I'm not sure what you're up to, but you could use...

    I'm not sure what you're up to, but you could use templates to overload on return type -


    template <class T>
    class population
    {
    public :
    virtual T getindividual(){return 0;}
    };
  6. Replies
    5
    Views
    2,395

    WinNT doesn't give you direct access to anything...

    WinNT doesn't give you direct access to anything outside your processes virtual memory space without some form of driver or hack. Do a search for 'giveio' in your favourite search engine.
  7. Replies
    3
    Views
    2,259

    The syntax should be something like - ...

    The syntax should be something like -


    #include <iostream>

    using namespace std;

    void solver(int x){
    if (x == 0)
    throw ("x found to be 0") ;
  8. As you've discovered, the compiler needs to see...

    As you've discovered, the compiler needs to see the full definition of a class before an instance of it can be constructed (it needs to know how big the object will be). The pointer version works...
  9. An STL way might be something like - ...

    An STL way might be something like -


    #include <iostream>
    #include <vector>
    #include <algorithm>
    #include <functional>

    using namespace std;
  10. Replies
    18
    Views
    10,770

    >When did I ever mention anything but the basic...

    >When did I ever mention anything but the basic loop I made?<

    Sorry I had no idea why you posted the asm. I assumed it was an attempt to justify your desicion not to turn on your compilers...
  11. Replies
    2
    Views
    1,292

    You could convert to the largest possible type....

    You could convert to the largest possible type. It doesn't sound like you're using templates properly, though.
  12. Replies
    3
    Views
    1,133

    >but would z be 159.000 etc... or would it come...

    >but would z be 159.000 etc... or would it come out with a completely random, something like 159.31415298?<

    From the standard -



    So it should be 159.000 if possible.
  13. Replies
    18
    Views
    10,770

    Well, I'm sure you probably didn't mean it but...

    Well, I'm sure you probably didn't mean it but that could be optimised to one instruction quite easily if it could be established that it resulted in an infinite loop.

    However, there probably...
  14. Replies
    18
    Views
    10,770

    >1) Let's see, optimization comes off in Dev-C++...

    >1) Let's see, optimization comes off in Dev-C++ unless you turn it on. Also, I know some people that keep it off just to make sure that things they don't want done aren't done. <

    Then don't be...
  15. Replies
    137
    Views
    30,333

    > But the most important thing is that there...

    > But the most important thing is that there things which you can't do in a high-level language, like interfacing directly with the hardware.<

    This statement is false.

    >I think that ASM will...
  16. Replies
    137
    Views
    30,333

    While this is true, portabiliy isn't just about...

    While this is true, portabiliy isn't just about crossing platforms but also about future portability. A hard coded asm executable will always remain the same. The theory is, if you were to upgrade...
  17. Replies
    18
    Views
    10,770

    >>In ygf's post, if you turned off compiler...

    >>In ygf's post, if you turned off compiler optimization<<

    Why would you do that?

    >>Although goto is shunned, it can be used efficiently in some situations.<<

    Not this one. If you really...
  18. Replies
    4
    Views
    2,958

    What compiler are you using? There may be a debug...

    What compiler are you using? There may be a debug version of operator new being called. Also, you should use the standard headers.
  19. Replies
    3
    Views
    2,286

    Perhaps you need to post some code; the...

    Perhaps you need to post some code; the description of your problem is as clear as mud. Have you implemented your own resevre and capacity functions for Hello? Or are you refering to the std::vector...
  20. Replies
    1
    Views
    1,514

    You create an array of 4 COption's then try and...

    You create an array of 4 COption's then try and assign to 5 of them in your mainMenu() function.
  21. Replies
    35
    Views
    8,171

    >I'm not here for a long time, as someone else...

    >I'm not here for a long time, as someone else already said. But it's already irritating how these questions keep getting asked over and over and over again. <

    We're not at all interested in your...
  22. Replies
    6
    Views
    1,460

    In that case - *ReturnedObject =...

    In that case -

    *ReturnedObject = g->GeneralDX.d3d8;

    You'll always have to de-reference the pointer to pointer otherwise your attempted return of an address will go out of scope.
  23. Replies
    6
    Views
    1,460

    What does g->GeneralDX.d3d8 return?

    What does g->GeneralDX.d3d8 return?
  24. Replies
    13
    Views
    4,045

    Check the FAQ...

    Check the FAQ.
  25. Replies
    6
    Views
    1,460

    Try - *ReturnedObject = &g->GeneralDX.d3d8;

    Try -

    *ReturnedObject = &g->GeneralDX.d3d8;
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4