Search:

Type: Posts; User: TriKri

Page 1 of 12 1 2 3 4

Search: Search took 0.02 seconds.

  1. Okay, thanks for your answer. So compilation may...

    Okay, thanks for your answer. So compilation may not go that much faster with pragma once because many compilers have intelligent detection of header inclusion guards? That kind of makes sense, since...
  2. Yes, I know, I use ordinary inclusion guards too...

    Yes, I know, I use ordinary inclusion guards too but I still want to use pragma once if it is supported. They do so here in the boost bind library. However, they only use pragma once when the...
  3. Check if #pragma once is supported at compile time?

    Hi, is there any way to check if


    #pragma once

    is supported by the compiler, during compile time?

    If it is supported I want to call it since it may speed up the compilation, but if it's not...
  4. Replies
    7
    Views
    8,111

    Thanks! That seems like it will do it. Well, I...

    Thanks! That seems like it will do it. Well, I guess it is easy to find it if you know what to look for. I actually made searches at both google and msdn, but I didn't manage to find anything I...
  5. Replies
    7
    Views
    8,111

    Put the computer to sleep

    Hi! Is there any way to put the computer to sleep (or hibernate or power off also for that matter) from within a program, with the same result as pressing the sleep (or hibernate or shut down) button...
  6. Replies
    20
    Views
    6,309

    Well, yeah, but various kinds of mathematical...

    Well, yeah, but various kinds of mathematical expressions. It depends on how much I want to put into it. I'm not making the library because I think that it will be used, but rather because I want to...
  7. Replies
    20
    Views
    6,309

    I see what you mean now with using generic...

    I see what you mean now with using generic programming, together with boost::variant; I have thought about and I think it sounds like a good idea. However, the purpose of the library was not to have...
  8. Replies
    20
    Views
    6,309

    No, that's for sure! :D Glad we're okay.

    No, that's for sure! :D Glad we're okay.
  9. Replies
    20
    Views
    6,309

    I felt the conversation had kind of taken a wrong...

    I felt the conversation had kind of taken a wrong turn; you seemed to question the very way I wanted to use the library in. I don't question either your or CornedBee's skills; I believe you both are...
  10. Replies
    20
    Views
    6,309

    I have explained my thoughts and I will not...

    I have explained my thoughts and I will not develop them anymore; so I'm gonna drop the conversation here. I know what I do, and if you don't believe in it that's up to you. I have already been...
  11. Replies
    20
    Views
    6,309

    You suggest that I should use boost::variant, but...

    You suggest that I should use boost::variant, but isn't that to runtime-polymorphic, or has to decide in runtime what type it is?



    I need to have all these types and the type switching since I...
  12. Replies
    20
    Views
    6,309

    CrnedBee: I'm not really sure if I understand...

    CrnedBee: I'm not really sure if I understand everything you wrote; for example, do you mean C++ templates when you refer to concepts, and C++ classes when you refer to interfaces?

    Then either...
  13. Replies
    13
    Views
    6,840

    I meant that I was going to use static_cast....

    I meant that I was going to use static_cast. Thank you. :)
  14. Replies
    13
    Views
    6,840

    I read the Wikipedia article about multiple...

    I read the Wikipedia article about multiple dispatch; it mentioned the use of visitor patterns, which actually has crossed my mind before. However, I think that the code easily would get messy if I...
  15. Replies
    20
    Views
    6,309

    Elysia: I still don't see the drawbacks with...

    Elysia: I still don't see the drawbacks with using OOP. Wouldn't the methods that are common to all graphs be implemented in the base class, while the methods that differ among the different graphs...
  16. Replies
    20
    Views
    6,309

    I'm not really sure what you mean, do you have an...

    I'm not really sure what you mean, do you have an example? Can't object-oriented programming be generic? According to Wikipedia, generic programming in C++ seems to be when you make use of templates,...
  17. Replies
    13
    Views
    6,840

    Hm, that's actually pretty smart. It would make...

    Hm, that's actually pretty smart. It would make each object 4 bytes bigger, but then since the type of the object would be known thanks to the variable, I won't need to have any v-table and the...
  18. Replies
    13
    Views
    6,840

    Because I can use a virtual function to do the...

    Because I can use a virtual function to do the job, which I believe is faster. But I don't know. Using a map was not a bad idea, though.





    I can give you an example of what I mean:

    A...
  19. Replies
    13
    Views
    6,840

    Virtual variables or constants?

    Hi! Is it possible to have virtual variables in a class (they would be stored in the v-table)? Or virtual constants? I know that I could just have a virtual function that returned the variable, but...
  20. Replies
    20
    Views
    6,309

    I'm actually making it more for learning purpose....

    I'm actually making it more for learning purpose. But who knows, maybe it can become useful. :) However, the problem I introduced is one of the more difficult ones, which I don't know how to solve in...
  21. Replies
    20
    Views
    6,309

    Question about multiple classes

    Hi, I've planned to create a math library, containing a lot of different classes, basically starting with the most basic classes as natural numbers or positive integers, then negative integers, and...
  22. Replies
    14
    Views
    22,241

    What is the practical difference between...

    What is the practical difference between declaring text_base as an array and declaring it as a char*?
  23. Replies
    14
    Views
    22,241

    That's it! Thanks!

    That's it! Thanks!
  24. Replies
    14
    Views
    22,241

    Length of string at compile time?

    Hi. Is there any way to get the length of a constant string at compile time, by following ISO C? I have this test code:



    #include <string.h>

    int main()
    {
    const char *text_base = "text...
  25. I already have error reporting; sometimes I get...

    I already have error reporting; sometimes I get timeouts from the attempts to open the port. It is the freezing of the program I want to prevent though. It's not a necessity, but it makes it feel...
Results 1 to 25 of 292
Page 1 of 12 1 2 3 4