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

Search:

Type: Posts; User: sockman

Page 1 of 7 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    36
    Views
    3,636

    Re: Order of operation on multi core hardware

    OK thanks everyone for your replies. I think it is pretty much as I expected - order of execution is not guaranteed. Again, thanks for taking the time to answer.
    Cheers,
    BJW
  2. Replies
    36
    Views
    3,636

    Order of operation on multi core hardware

    Hello,
    On a multi-core machine, am I guaranteed to have my code executed in the precise order it was written?
    Cheers,
    BJW
  3. Thread: Is this safe?

    by sockman
    Replies
    2
    Views
    407

    Is this safe?

    The following code fails as expected because I am passing an invalid pointer:


    void func2(char* c, char* d) {
    c = d;
    }

    void func() {
    char* c = NULL;
    char* d = new char('f');
  4. Re: Console exits before I get a chance to see the output

    As for your intellisense issue, try deleting your project's .ncb file. It's probably in the same folder as your project file. That should force VS to regenerate the intellisense. It's an issue that...
  5. Replies
    9
    Views
    1,109

    Re: Need to return a *char not address of...

    First of all your function is not set up to return a const char. You need to declare it thusly:


    const char *ftostr(float dVar) {...}


    Secondly, you are returning a pointer to a local...
  6. Replies
    0
    Views
    477

    Plugin for graphing buffers

    Hi all,
    I'm looking for a vs plugin which can graph buffers of signal information. Basically I want a buffer visualisation tool which I can use while the debugger is running to inspect the contents...
  7. Replies
    10
    Views
    873

    Re: Another design question

    Hi monarch_dodra,
    I considered this as an option, but I have a hunch it's going to to get me into hot water because whenever I have to perform one of these mutually exculsive operations I will have...
  8. Replies
    10
    Views
    873

    Re: Another design question

    Thanks Russco,
    That was my initial plan. I just thought I'd see if anyone had other ideas. The problem I have with that method is I have to query the object to see what type it is. I was hoping to...
  9. Replies
    10
    Views
    873

    Re: Another design question

    @Lindley
    Yes, I do plan to treat them as the same type of object - they basically are. It's just that in their specialisation there are a couple of mutually exclusive operations.
    Cheers,
    BJW
  10. Replies
    10
    Views
    873

    Re: Another design question

    @Amleto
    Sorry I probably wasn't specific enough about the problem. I want to have a list of objects of type C and treat them generically. Which I can't completely do since there are a couple of...
  11. Replies
    10
    Views
    873

    Another design question

    Hi all,
    I have a design issue and want to get some feedback on solutions.

    I have two classes, let's call them A and B. They have very similar interfaces and are 98% polymorphic. It is in the 2%...
  12. Replies
    4
    Views
    958

    Re: Help with writing a program to do this...

    Work hard, be good to your mother and maybe one day you will learn the value of doing your own homework.
  13. Re: Looking for a neat way to accomplish this type problem

    Yes, that was a great solution - fits perfectly for what I need. Thanks a bunch!
    BJW
  14. Re: Looking for a neat way to accomplish this type problem

    Yes. Hence the question.

    @John
    Thanks for that. From the quick look I just had it seems spot on. I will have a proper look when I get back to work tomorrow.
  15. Looking for a neat way to accomplish this type problem

    I have a design issue which I've had in the past and never really found a satisfactory solution for, so I was hoping to get some fresh ideas on how to handle it.

    I have a list of objects. Each...
  16. Replies
    11
    Views
    7,480

    Re: Change stupid indent style

    There are times where bracing in case branches is necessary such as the following. Case 1 is how I like to format my braces. Case 2 is how Visual studio lays it out. I find the second way much harder...
  17. Replies
    11
    Views
    7,480

    Re: Change stupid indent style

    Thanks Mike. Yes 2005 has that option - I have it unchecked, but it doesn't seem to govern the bracing in switches.

    I just don't know where VS got this indent style from and why it only applies it...
  18. Replies
    11
    Views
    7,480

    Change stupid indent style

    Visual Studio (2005) automatically indents braces for each case in switch statements in what I consider to be the most impossibly idiotic manner. I have always ignored it and fixed it manually but...
  19. Thread: * 8 vs << 3

    by sockman
    Replies
    9
    Views
    783

    Re: * 8 vs

    The compiler (certainly VStudio anyway) generates the same code for both cases so there is no performance gain in shifting over multiplying.

    I agree with both superbonzo and D_Drmmr. I try to pick...
  20. Re: C++ problems with class/default constructor

    You declare Bow one and two as member variables of Test. Then in the constructor of Test you redeclare Bow one and two. Here you are declaring two new variables which will last for the scope of the...
  21. Replies
    2
    Views
    533

    Re: to Process or not to Process?

    Sometimes it can be helpful to run plug-in engines in a separate process because of unexpected crashes caused by dodgy 3rd party dlls. If there is a crash you can shut down the plug-in process, but...
  22. Replies
    10
    Views
    1,754

    Re: compiler refues to inline my function

    @olivthill:
    Maybe you need to review some basic text books? This loosing function as you call it has very specific signal processing purposes and is called from hundreds of places in my code. This...
  23. Replies
    10
    Views
    1,754

    Re: compiler refues to inline my function

    Thanks for the responses.

    @lindley: Good idea, I'll try it on Monday when I get back to work.

    @cilu: I know the inline is just a suggestion to the compiler - seems like most of the time the...
  24. Replies
    10
    Views
    1,754

    compiler refues to inline my function

    I have the following simple function:



    inline int Gain(int in, int mq)
    {
    return (in * mq) >> 9;
    }
  25. Replies
    6
    Views
    8,746

    Re: Static array allocation problem

    As Lindley says, that's the way arrays on the stack work. When you write:


    int myarray[] = {5, 6, 7};

    You are creating a memory block three ints long. The address of that block is myarray[0]...
Results 1 to 25 of 157
Page 1 of 7 1 2 3 4





Click Here to Expand Forum to Full Width

Featured