CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: superbonzo

Page 1 of 5 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    7
    Views
    166

    Re: Boost library thread callbacks

    an easy solution could be to create a worker thread in js via firefox's web workers instead. Your dll could still have its own thread pool, but using the firefox worker thread as a synchronous hub...
  2. Replies
    7
    Views
    166

    Re: Boost library thread callbacks

    I cannot say how it works on OSX, but in Windows a DLL has no notion of "main thread", it's the loading process that controls in which thread the invoked dll procedures are called. Now, is the...
  3. Re: Operator overloading and friend functions

    yes, you can friend a member function:



    class A{ public: void f(); };
    class B{ friend void A::f(); void g(); };

    void A::f(){ B b; b.g(); }
  4. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    I'm so sorry I must confess, sometimes I get really confused, sometimes I don't even remember if I read a book or not ( but luckily you know better than me ! ) ... then, dominated by embarassment I...
  5. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    no problem ( anyway, in the meantime those topics went in a dead end for some reason ... )

    regarding the pointer VS reference issue, if one strictly restricts himself to C with classes then your...
  6. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    laserlight, I think it's time to surrender to nuzzle's mind reading abilities ... now, I'm just curious to see if OReubens has more patience than I have ... :)
  7. Re: Pasting "-" does not give a valid preprocessing token

    according to the standard, the concatenation of string literals has its own translation phase (6th) occuring after macro expansion but before unit translation. So, at least standard-wise, they are...
  8. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    I totally ignore what's your claim here ... yes, the STL is a standard but it's also a library design, so what's your logical point ??



    yes, but sice I want to avoid yet another flame war based...
  9. Re: Question about unions,bitfields

    first of all, this is all implementation defined behavior. Even the signedness of an "int" bitfield is implementation defined ( you should write "signed int" to enforce a signed integer, although int...
  10. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    regarding the hypothetical thread-friendly heap I agree with you, it seems possible only as a compromise rendering some use cases sub-optimal ( which is against the C++ philosophy, IMHO ).

    That...
  11. Re: General Programming Question - Self Enumerating Pangrams

    given an NP-complete problem A and a problem B, in order to prove that B is at least NP-complete you should solve A in terms of B; if I read your post correctly, you did the opposit, so you didn't...
  12. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    maybe it's a terminology problem, but to me, "connected", "brittle" and "monolithic" are properties related to a (library) design, not its implementation, sorry if you meant something else. The STL...
  13. Replies
    55
    Views
    1,752

    Re: Pseudopointers

    just to clarify, as I pointed out in the beginning of my last post above, I never said that arrays can have padding, only structs can have padding.
  14. Replies
    55
    Views
    1,752

    Re: Pseudopointers

    you said



    now, apparently the two examples appear reversed in post#1; obviously, the padding I referred to is of the struct example.



    given a pointer "T* p" and an integer type I with...
  15. Replies
    55
    Views
    1,752

    Re: Pseudopointers

    surprisingly (?), you not only insist on ignoring others' advice, you also keep saying wrong things proving poor understanding of basic programming facts:



    neither example "2" nor "3" is...
  16. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    tell me, where did I say that the reason of non-scalability is the virtual call ??? the point is exactly to avoid that "selection" in the first place, unless it's truly required to happen at runtime....
  17. Re: "Creating variable" on runtime? - message decoding

    yes, my tentative code snippet is supposed to do exactly what you describe: it parses the description file extracting each frame definition, which is then put in an unordered_map that allows you to...
  18. Re: "Creating variable" on runtime? - message decoding

    sorry, so, by "project dependant" you mean that the data structure itself is choosen at runtime, not just the id mapping, don't you ?

    if yes, then, as suggested by Paul, you just need to define...
  19. Re: "Creating variable" on runtime? - message decoding

    there are many ways of doing such a thing, ranging from the straightforward ( S_M_A's suggestion; BTW, I think he already implied the preprocessing and caching of the file data, no need to read the...
  20. Replies
    42
    Views
    1,341

    Re: When to use pointers?

    I think the major source of inefficiency of heap-managed objects is not much the allocation process per-se, but rather that such an approach usually implies a run-time binding of the abstraction...
  21. Replies
    8
    Views
    285

    Re: boost::thread error

    evilGil, contrary to most boost libraries, boost::thread is NOT header-only and it should be compiled separately to the wanted target. With VC++, everything is automated, just take a look at boost...
  22. Re: Can local variable be passed as parameter into a new thread?

    D Drmmr, that code doesn't seem correct to me because std::thread destructor will call terminate() if still joinable ( due to exception safety reasons ). Hence, you must either detach() or join() in...
  23. Re: Modifying an existing array with a function

    this is true, but is it really worth it ? consider the OP's doubts and georanger's reference aversion; I think both come from the fact that when they look at a code like "f(T& x)" they view the "&"...
  24. Re: Singleton vs Globals vs Alternatives (Best Practice, Design)

    regarding your original use case, all threading libraries I know of allow you to pass data to the spawn thread; for example, given some synchronization object "mysync", in c++11 you can write things...
  25. Re: Modifying an existing array with a function

    actually, one could say the same thing in C++: one can think at "pass-by-reference" simply as the process of initializing a variable of reference type. This way of thinking is especially useful given...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width