Search:

Type: Posts; User: Stuka

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Replies
    35
    Views
    4,071

    Ah, yeah - forgot about those! Good call.

    Ah, yeah - forgot about those! Good call.
  2. Thread: newbie help COM

    by Stuka
    Replies
    12
    Views
    1,670

    I'd have to see more - it's been a while since I...

    I'd have to see more - it's been a while since I wrote the code to handle the serial port using those, and I have yet to successfully wrap any of my C++ in .NET. I'll dig up my code tomorrow and...
  3. Replies
    35
    Views
    4,071

    reserve() is handy for just such a thing -...

    reserve() is handy for just such a thing - another potential improvement (though w/o having read in detail all of the thread, I could be off ;) ) would be to make your vector store pointers rather...
  4. Replies
    8
    Views
    1,276

    Strictly from the "My $0.02" department, I'd lose...

    Strictly from the "My $0.02" department, I'd lose the separate arrays, and use a std::map<indexType, valueType>. That'll give you a LOT more efficiency.
  5. Replies
    6
    Views
    1,279

    From a C++ philosophy standpoint, why are you...

    From a C++ philosophy standpoint, why are you using 1) Dynamically allocated arrays vs. std::vector, and 2) Dual (presumably related, since you don't offer a count for both arrays) arrays rather than...
  6. Replies
    4
    Views
    4,457

    CaeZaR: What Magos said, with the additional...

    CaeZaR: What Magos said, with the additional recommendation that you drop C-style file input for C++ iostreams in C++ code. First off, IMHO it's much easier, and second, it's better integrated with...
  7. Thread: Recieve packets

    by Stuka
    Replies
    9
    Views
    1,802

    Syneris: exactly - that's why I pointed him to...

    Syneris: exactly - that's why I pointed him to Beej's tutorial. It's one of the better ones out there about explaining the whole TCP client/server process from a socket-level view that I've ever seen.
  8. Replies
    2
    Views
    1,271

    Your bitwise & in the conditional doesn't modify...

    Your bitwise & in the conditional doesn't modify the flags set in any way. The expression returns a temporary boolean variable that's evaluated (as true in this case) and then disappears. Since flags...
  9. Thread: Recieve packets

    by Stuka
    Replies
    9
    Views
    1,802

    You've only got one socket there - to do 2-way...

    You've only got one socket there - to do 2-way communication, you need 2 sockets - one is your server socket, which you bind() and recv() on, the other is your client socket, which you connect() with...
  10. Thread: newbie help COM

    by Stuka
    Replies
    12
    Views
    1,670

    I have some old code lying about (at work) which...

    I have some old code lying about (at work) which accesses the COM port in Visual C++ 6 using CreateFile(). There was also an article in the MSDN magazine a couple of years back (I think - the mag's @...
  11. Thread: File I/O

    by Stuka
    Replies
    13
    Views
    1,916

    laserlight: you're probably right on that - I was...

    laserlight: you're probably right on that - I was reading and typing fast, and it's late. As for the brackets, I'd suspect you're right, but since we haven't seen that code, it's hard to judge. I...
  12. Replies
    10
    Views
    7,525

    The problem you have while using...

    The problem you have while using &MyClass::ThreadFunc (which , btw, is what you really WANT to use), is that MyClass::ThreadFunc doesn't actually match the function signature of the ThreadFunc...
  13. Thread: braces

    by Stuka
    Replies
    27
    Views
    3,401

    Aw, heck, let's start 2 holy wars in one thread!...

    Aw, heck, let's start 2 holy wars in one thread! Use vim! *dons flame-proof suit*
  14. Replies
    20
    Views
    1,824

    It's POSSIBLE, but it's not easy. You'd need an...

    It's POSSIBLE, but it's not easy. You'd need an OS-level app to do it, since accessing memory outside an app's allocated space typically results in a segfault - or a General Protection Fault in Win32...
  15. Thread: File I/O

    by Stuka
    Replies
    13
    Views
    1,916

    You shouldn't need those brackets. Your error is...

    You shouldn't need those brackets. Your error is caused because the << operator on an ostream, by default, stops on whitespace.
  16. Replies
    4
    Views
    1,371

    I'm not an expert - just read a CUJ article on...

    I'm not an expert - just read a CUJ article on typename not to long ago. The reason, I think, is because of the additional scoping operator in there, and the way the compiler looks up names. It just...
  17. Thread: Assert

    by Stuka
    Replies
    8
    Views
    3,909

    If the variable extention is a...

    <quibble> If the variable extention is a std::string, you can do that comparison, because the literal string will be converted implicitly</quibble>
  18. Replies
    4
    Views
    1,371

    I *think* this is where you need the typename...

    I *think* this is where you need the typename keyword, like so:
    MOO(typename std::vector<T>::iterator m) Basically, because of templating, the compiler doesn't realize that std::vector<T> is a...
  19. Thread: ios::binary

    by Stuka
    Replies
    8
    Views
    2,119

    And is there something wrong with...

    <off topic>And is there something wrong with being lazy and antisocial? I *am* a programmer!</off topic>
  20. Replies
    4
    Views
    1,060

    You're trying to pass the literal string "VK_A"...

    You're trying to pass the literal string "VK_A" (or b, or whatever) - what the function wants is the symbolic constant VK_A
  21. Thread: Linked Lists...

    by Stuka
    Replies
    3
    Views
    1,023

    Personally, when I want random access I use a...

    Personally, when I want random access I use a std::vector, not an array :-P
  22. Replies
    6
    Views
    1,489

    That's a check for valid input. The function...

    That's a check for valid input. The function expects iPos (passed in by the function's caller) to be >= 1. If it's not, the function bails out rather than running with bad data.
  23. Thread: ios::binary

    by Stuka
    Replies
    8
    Views
    2,119

    In addition, on platforms where there is no...

    In addition, on platforms where there is no difference beteween text and binary files (Unix/Linux for example), ios::binary is unneccessary.
  24. Replies
    13
    Views
    1,749

    The first thing I'd try is checking argv[1] - in...

    The first thing I'd try is checking argv[1] - in normal console mode, argv[0] is the program name, and argv[1] is the first argument passed. The Windows GUI typically invokes programs by calling them...
  25. Replies
    3
    Views
    1,364

    _inp and _outp are most likely failing because...

    _inp and _outp are most likely failing because they compile to assembly instructions that only the OS is allowed to use, and your program is running in userspace. With the VC++ code, you used OS...
Results 1 to 25 of 52
Page 1 of 3 1 2 3