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

Search:

Type: Posts; User: Chris_F

Page 1 of 37 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    9
    Views
    2,412

    Re: unsigned long vs long

    2^N - 1 for unsigned
    2^(N - 1) - 1 for signed

    Either way it's more bytes then you'll ever need.
  2. Replies
    9
    Views
    2,412

    Re: unsigned long vs long

    I think neither is particularly better than the other.

    long is a 32-bit value, which means if you use the signed version you will be limited to handling files up to 2GB in size, or 4GB if you use...
  3. Replies
    15
    Views
    1,830

    Re: Simple question - mem addresses

    Why would current and head have the same address? They are two different variables, what they point to is irrelevant. I think you are mistakenly using the address-of operator when you don't mean to.
  4. Replies
    1
    Views
    1,698

    Re: Capitalize a String in C++

    Not really. You've only given a small part of your code and it's hard to say what's really going on, especially since this code is working with file IO.

    Why don't you try using your debugger and...
  5. Replies
    18
    Views
    2,321

    Re: C++11 and third party libraries - big issues

    No, it simply means there is s difference of opinion. As it's been stated many times in this thread, C and C++ have been around decades longer than C# and Java. They still serve their purpose just as...
  6. Replies
    18
    Views
    2,321

    Re: C++11 and third party libraries - big issues

    C++ better never have a standard GUI library purposed. C++ like C is meant to be portable to any system. I can compile C++ for a 8-bit microcontroller. How exactly is a GUI library supposed to be...
  7. Replies
    18
    Views
    2,321

    Re: C++11 and third party libraries - big issues

    Thank you captain hindsight? Are you just complaining about C++ and how Java is better?
  8. Thread: Opcodes in C++

    by Chris_F
    Replies
    3
    Views
    775

    Re: Opcodes in C++

    I suppose you could do something like this:



    int main()
    {
    const char* code = "\x90\x90\x90\x90";
    void (*foo)(void) = (void (*)(void))code;
    foo();
    }
  9. Replies
    3
    Views
    547

    Re: Lambda issues in VS2010

    *facepalm*

    Figures. This is after all the reason I've distanced myself from Microsoft in the first place.

    If there was a problem like this in GCC, I'd probably have to wait a whole week for a...
  10. Replies
    3
    Views
    547

    Lambda issues in VS2010

    So, I'm used to using GCC by now, but unfortunately I'm stuck working with Visual Studio at the moment. For some reason, this code works just fine in GCC, but fails to compile in Visual Studio.


    ...
  11. Thread: Random Numbers

    by Chris_F
    Replies
    10
    Views
    1,530

    Re: Random Numbers

    Order of operation matters. It's the same in C++ as it is for all math.
  12. Thread: C++11 Standard

    by Chris_F
    Replies
    7
    Views
    830

    Re: C++11 Standard

    A link to the draft was in the first paragraph of the C++11 wikipedia page.

    http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf

    Only the drafts are free.
  13. Re: Creating an html 5 browser in C# : Getting started?

    Why don't you look into Gecko or WebKit (the rendering engines for the two most popular HTML5 browsers, Firefox and Chromium respectively) as I'm sure you can integrate them with a WinForms app...
  14. Replies
    13
    Views
    1,307

    Re: Memory managment in C++

    Both. The compiler has an implementation of memory management that ultimately relies on the OS, which has it's own implementation. In addition, you can overload new and delete, so you could also have...
  15. Replies
    4
    Views
    1,171

    Variadic function pointer

    Is this legal?



    struct Test
    {
    void (*ptr)(void* p, ...);
    };

    void myfunction(void* p, int arg1, int arg2) {}
  16. Replies
    3
    Views
    917

    Re: pugixml and node_pi

    Try using encoding_utf8.
  17. Replies
    3
    Views
    917

    Re: pugixml and node_pi

    How exactly is it formatting it?
  18. Thread: TinyXml

    by Chris_F
    Replies
    9
    Views
    1,627

    Re: TinyXml

    Well, comments are parsed into the DOM as TiXmlComment, so you should be able to locate the comments. That being said, I think what you are doing is wrong. I don't think you should be using comments...
  19. Replies
    3
    Views
    521

    Re: PIC programming

    I suppose it may look something like this:



    main()
    {
    for(;;)
    {
    if(input(pin_B0)) //activate press
    {
  20. Replies
    3
    Views
    521

    Re: PIC programming

    I programmed a PIC once. I distinctly remember it being difficult to find software for it. I don't even think a free compiler exists for PICs, so you are probably stuck having to shell out a few...
  21. Re: causes for this error -Attempted to read or write protected memory

    Well, it could be that your program attempted to read or write protected memory. It may be an indication that other memory is corrupt.

    Seriously though, that is pretty much a generic oh crap your...
  22. Thread: Timer problems

    by Chris_F
    Replies
    7
    Views
    636

    Re: Timer problems

    try something like this:



    DateTime last = DateTime.Now;
    for (; ; )
    {
    while (DateTime.Now - last < TimeSpan.FromMinutes(5))
    {
    Thread.Sleep(100); //sleep a bit to not...
  23. Thread: Timer problems

    by Chris_F
    Replies
    7
    Views
    636

    Re: Timer problems

    Sleep specifies a minimum amount of time to sleep for. It only checks that at least that much time has passed before resuming. It is perfectly alright for it to wait longer than you specify. Since...
  24. Thread: Timer problems

    by Chris_F
    Replies
    7
    Views
    636

    Re: Timer problems

    Post the relevant code so we can see what is really going on.
  25. Replies
    10
    Views
    1,832

    Re: Reading an XML file using C#

    maybe I'm missing something here, but shouldn't it be



    foreach (XmlElement match in doc.SelectNodes("root/software/software_entry_name"))
Results 1 to 25 of 912
Page 1 of 37 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center