Search:

Type: Posts; User: gardhr

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    2,006

    To be fair, a clearer way of stating that might...

    To be fair, a clearer way of stating that might be "the name of an array decays to a pointer to it's first element" or some such. After all, the "concept" of a pointer is a variable that stores the...
  2. Thread: Speech to text

    by gardhr
    Replies
    3
    Views
    1,414

    From scratch? Difficulty level == high. Not sure...

    From scratch? Difficulty level == high. Not sure if there are any libraries available to do such a thing, though. Try Google?
  3. Replies
    1
    Views
    3,335

    So let me get this straight. You wrote your very...

    So let me get this straight. You wrote your very own implementation, but yet you don't know how to correctly declare a char array, how to call a function, or how to write code in main that makes any...
  4. Thread: A C decompiler

    by gardhr
    Replies
    3
    Views
    2,491

    A tool that can handle all types of object files...

    A tool that can handle all types of object files is probably not going to be easy to find simply because the format is so compiler dependent. On the other hand, decompilers for executable formats...
  5. Replies
    6
    Views
    1,237

    Unsubstantiated rumors of ruby red slippers have...

    Unsubstantiated rumors of ruby red slippers have circulated from time to time (mostly in film), but that claim that has been vehemently denied by the Wizard of Carat, who insists that he has never...
  6. recQS() shouldn't need to be declared a friend...

    recQS() shouldn't need to be declared a friend since it just takes a vector and two integers as arguments. But sort() no doubt needs to be (unless of course you just make it a member function, which...
  7. Replies
    14
    Views
    840

    What exactly do you not understand about the...

    What exactly do you not understand about the output?
  8. Replies
    8
    Views
    2,582

    Actually, you should be able to pun a native...

    Actually, you should be able to pun a native array directly to an std::array and vice versa.



    int main(void)
    {
    assert(okay_to_cast_std_complex_to_array<float>());
    const std::size_t size =...
  9. Replies
    4
    Views
    868

    First of all, this ain't an ambiguity issue. It's...

    First of all, this ain't an ambiguity issue. It's called "What happens when we use macros incorrectly?". Second, the answer to your question will reveal itself once you expand the macro "manually" in...
  10. Replies
    8
    Views
    2,582

    Most likely, but it's certainly not guaranteed....

    Most likely, but it's certainly not guaranteed. First, there is the alignment issue. As long as we're talking about complex<POD>, however, that shouldn't be a problem. The next question is whether or...
  11. Replies
    8
    Views
    935

    You could also either specify the template...

    You could also either specify the template parameter explicitly (foo<double>(0, 0.5)) or else cast the integer literal to double. Laserlight's suggestion really makes the most sense, though. As they...
  12. Replies
    14
    Views
    3,329

    One more important point: This isn't simply a...

    One more important point: This isn't simply a memory leak issue. Consider a situation where you're allocating an object that writes data to a very fragile file; failing to deallocate it properly...
  13. Replies
    14
    Views
    3,329

    Basically, whenever you assign an allocation to a...

    Basically, whenever you assign an allocation to a raw pointer (except where explicitly "guarded" by a destructor) you're writing exception unsafe code! That is, if an exception gets propagated within...
  14. Replies
    3
    Views
    1,336

    Of course! Such an unbelievably silly mistake,...

    Of course! Such an unbelievably silly mistake, too. Oh well, problem solved now. Thanks so much for the keen eyes. Cheers!
  15. Replies
    14
    Views
    3,329

    Is there a good reason why you're not using an...

    Is there a good reason why you're not using an std::vector or similar to manage the memory? Because as it stands you're code isn't exception-safe (not to mention that your problem at hand is most...
  16. Replies
    3
    Views
    1,336

    Elusive bug in LFSR implementation

    Okay, so I've put together a basic LFSR class as well as a test driver to verify that it was implemented correctly (the driver employs a brute force approach that simply cycles through every possible...
  17. That shouldn't even compile....

    That shouldn't even compile. std::istream::operator >> returns an std::istream&, and std::getline doesn't take any such parameter. Plus you've got an extra closing parenthesis at the end there....
  18. Sorry, your program is neither stable nor secure,...

    Sorry, your program is neither stable nor secure, and lacks even the most basic level of encapsulation. Read up on buffer overflows and how to prevent them, and consider storing a hash or some such...
  19. In practice it should work fine. That said, I'm...

    In practice it should work fine. That said, I'm not so sure that it's guaranteed by the standard, and besides that it's probably considered "bad form". A more conventional approach would be to simply...
  20. Replies
    5
    Views
    1,902

    No, that's still going to reject a lot of valid...

    No, that's still going to reject a lot of valid strings. Just verify that the very next character isn't alphabetical and everything should work fine.
  21. Replies
    1
    Views
    1,159

    First try to implement everything as best as you...

    First try to implement everything as best as you can. Once you get stuck somewhere at that point then post here for advice. Beyond that, I would say put everything into functions; modular code is...
  22. Replies
    13
    Views
    5,456

    Quite the opposite, actually. Each power-of-two...

    Quite the opposite, actually. Each power-of-two sub-convolution is done in it's own stage (hence, "butterfly") so in fact the individual terms can be splitup, calculated in tandem, and then combined...
  23. Thread: CRC Strength

    by gardhr
    Replies
    13
    Views
    4,005

    In that case for your single byte packets why not...

    In that case for your single byte packets why not just perform a CRC on the data "transposed" to two bytes. So for example if the data byte is 3F, calculate CRC(3F3F). For even better distribution...
  24. Thread: CRC Strength

    by gardhr
    Replies
    13
    Views
    4,005

    Hmm, I wonder if a polynomial with more terms...

    Hmm, I wonder if a polynomial with more terms (and thus more "taps") might do a better job propagating errors in smallish data streams?
  25. Thread: CRC Strength

    by gardhr
    Replies
    13
    Views
    4,005

    That sounds like a good strategy. Trying to...

    That sounds like a good strategy. Trying to interoperate with third party products can be a real pain in the arse sometimes, no doubt. Especially when the customer doesn't even make a distinction...
Results 1 to 25 of 153
Page 1 of 7 1 2 3 4