Search:

Type: Posts; User: cstryx

Page 1 of 5 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    8,677

    There's no implicit conversion here for things...

    There's no implicit conversion here for things like this. How are you expecting a string to be translated to the enum type? You need to parse the input to the enum type if you want this to work.
  2. CSV = comma separated values Hint, hint.

    CSV = comma separated values

    Hint, hint.
  3. Thread: Two's Compiment

    by cstryx
    Replies
    5
    Views
    4,312

    Or for a different approach: int...

    Or for a different approach:

    int six_bit_sign_extend(unsigned char b) {
    b &= 0x3f;
    return b & 0x20 ? b | ~0x3f : b;
    }
  4. Replies
    1
    Views
    982

    Read the data then use strncmp? If it doesn't...

    Read the data then use strncmp? If it doesn't match then don't do anything.
  5. Replies
    16
    Views
    9,723

    Why not just do integer addition? 06/08 (06...

    Why not just do integer addition?

    06/08

    (06 * 100) + 08 = 608

    Then a format specifier to output 4 digits with leading 0's if necessary. (0608)

    edit: Or the reverse I can see is what...
  6. Replies
    24
    Views
    2,821

    ^^ I can get that executable down to about 2k...

    ^^ I can get that executable down to about 2k even instead of 4k, but if you are using C++ without the STL then how can it be considered C++? Why didn't you just write the code in C? Sounds like you...
  7. Replies
    24
    Views
    2,821

    This is what I'm concluding here for myself. 100%...

    This is what I'm concluding here for myself. 100% agreed.
  8. Replies
    24
    Views
    2,821

    Okay.. But you are neglecting to consider one...

    Okay.. But you are neglecting to consider one critical point here -- The public GUI frameworks that already exist out there for people to use contain absolutely everything to accommodate all...
  9. Replies
    24
    Views
    2,821

    I posted this topic in the C++ section because it...

    I posted this topic in the C++ section because it *was* originally about MFC. Additionally, with MFC you get the design view for building windows applications, which makes GUI creation much easier...
  10. Replies
    24
    Views
    2,821

    Sure, but hard drives aren't the only means of...

    Sure, but hard drives aren't the only means of storing portable programs. What if I want to maximize the usage of my USB key with programs to use as tools? I know you can get 1TB USB keys now, but...
  11. Replies
    24
    Views
    2,821

    I already use .NET for specific projects but why...

    I already use .NET for specific projects but why would .NET be a solution for code size? Yes the frameworks exist on the Windows machines, but that means managed code and JIT-compilation unless you...
  12. Replies
    24
    Views
    2,821

    It's more likely than Qt though to be on the...

    It's more likely than Qt though to be on the target Windows machine IMO. Also my program is down to ~100kb after some configuration and modification.
  13. Replies
    24
    Views
    2,821

    Why not though? If I want something smaller in...

    Why not though? If I want something smaller in codesize then Qt or any other cross-platform framework is not going to be great, especially when I don't plan for platform scalability. Also, wxWidgets...
  14. Replies
    24
    Views
    2,821

    Thoughts on MFC?

    I'm curious what the general thoughts are on MFC for C++ GUI (dialog) projects are? Good/Bad? Advantages/Disadvantages?

    Is it even recommended for creating GUI applications or would you go with...
  15. Thread: Psuedocode

    by cstryx
    Replies
    33
    Views
    10,465

    Okay, I'm sorry but are you trying to imply that...

    Okay, I'm sorry but are you trying to imply that you have more (or lots of) experience with C# just based on your join date to this forum? :S Your join date doesn't say anything about your experience...
  16. Thread: Psuedocode

    by cstryx
    Replies
    33
    Views
    10,465

    The compiler typically will optimize a simple...

    The compiler typically will optimize a simple foreach loop to a for loop anyways if you've ever debugged through .NET binaries for such analysis. Therefore, in theory yes, but not really because of...
  17. Thread: Psuedocode

    by cstryx
    Replies
    33
    Views
    10,465

    Significantly slower was a measurement of...

    Significantly slower was a measurement of performance in context with my comparison between simple string manipulation and regex itself, which has nothing to do with human perception. Also, it's not...
  18. Thread: Psuedocode

    by cstryx
    Replies
    33
    Views
    10,465

    They are useful for pattern matching, but the...

    They are useful for pattern matching, but the overhead of using regex in this case is going to be significantly slower. It may only be faster if you are using compiled regex on a much larger piece of...
  19. Thread: Psuedocode

    by cstryx
    Replies
    33
    Views
    10,465

    In my opinion, regex is not the best solution...

    In my opinion, regex is not the best solution anyways and it's also going to be slower than regular string manipulation.

    public static bool ValidID(string id)
    {
    int letters, digits;
    int...
  20. Thread: Check word

    by cstryx
    Replies
    23
    Views
    7,100

    Exactly, but null terminated strings vs the usage...

    Exactly, but null terminated strings vs the usage of std::string -- which should come first? This is what I had in mind when I brought up subjectivity. And where should dynamic allocation come in?...
  21. Thread: Check word

    by cstryx
    Replies
    23
    Views
    7,100

    If C++ didn't exist, are you saying that people...

    If C++ didn't exist, are you saying that people would not be capable of learning C in that case because they have to deal with null-terminators? IMO C is actually an easier language than C++ because...
  22. Thread: Check word

    by cstryx
    Replies
    23
    Views
    7,100

    I guess it depends on your perspective. For...

    I guess it depends on your perspective. For myself, which is all I can speak for, understanding low level concepts has definitely helped me understand how to effectively use such *features* of the...
  23. Thread: Character Array

    by cstryx
    Replies
    4
    Views
    946

    It's great that we have pretty much all bases...

    It's great that we have pretty much all bases covered now that the issues have been pointed out and laserlight was kind enough to provide further detail about them.

    One thing I will add is about...
  24. Thread: Check word

    by cstryx
    Replies
    23
    Views
    7,100

    Fair enough. As far as "string's" go, I was more...

    Fair enough. As far as "string's" go, I was more apt to *guess* that he was going to take the suggestion into consideration without the use of std::string, and I know that many instructors start...
  25. Replies
    2
    Views
    554

    You can't parse a number from userInput because...

    You can't parse a number from userInput because of the 'C' at the front. Try this:

    sscanf(userInput + 1, "%d", &number);
Results 1 to 25 of 123
Page 1 of 5 1 2 3 4