Search:

Type: Posts; User: nvoigt

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    2
    Views
    2,098

    Moved to C. strlen does not seem to be good C++...

    Moved to C. strlen does not seem to be good C++ either.
  2. In C# there is always a way to wait for a thread...

    In C# there is always a way to wait for a thread or process. Looping and polling is always the worst way to spend time. There is either callbacks or signals or continuation tasks or a million other...
  3. As a note for Sleep: Don't. Simple as that....

    As a note for Sleep: Don't. Simple as that. Don't. All threading features in C# have a way to call you back when they are finished. Sleeping is an error, plain and simple. Even sleeping in a loop...
  4. Replies
    3
    Views
    1,320

    When you are writing C# you migh as well follow...

    When you are writing C# you migh as well follow the C# coding guidelines especially concerning naming and spacing. Your code looks like a mess of badly formatted C.

    None of your variable names...
  5. Replies
    17
    Views
    2,460

    Have you ever met a carpenter that refuses to put...

    Have you ever met a carpenter that refuses to put a nail in because screws are way better? Who calls people using a hammer "traitors", because everyone knows that only screwdrivers are the real deal?...
  6. Can you read a number from the console and print...

    Can you read a number from the console and print it? Show us some code :)
  7. Replies
    32
    Views
    3,256

    Your actor class has a position. If you implement...

    Your actor class has a position. If you implement it there, you don't need to implement it in your subclasses bug and ant again.

    You Actor has a position, but your grid also saves the position....
  8. Replies
    32
    Views
    3,256

    I don't understand why you want to derive your...

    I don't understand why you want to derive your bugs from a grid. Neither an ant nor a bug is a grid. Both can be on a grid if you want. I also don't understand your factory methods that are basically...
  9. Replies
    32
    Views
    3,256

    Can you give a real world example for this? With...

    Can you give a real world example for this? With real classnames so we can maybe suggest a better solution? Right now I don't even know what you are trying to do :(
  10. Replies
    32
    Views
    3,256

    That doesn't make sense. If it's static, it...

    That doesn't make sense. If it's static, it exists once per class (once per T here because Grid<int> is another class than Grid<double>) and you shouldn't allocate memory once per instance of a...
  11. Replies
    4
    Views
    4,046

    Oh, ok, cool :)

    Oh, ok, cool :)
  12. OpenGameArt.org (http://opengameart.org/) has a...

    OpenGameArt.org has a lot of free graphics, maybe you can find a nice background there. Check the license agrrements, most are free to use, some require you to mention them in the credits if you use...
  13. Replies
    4
    Views
    4,046

    What happens if you remove all that reading and...

    What happens if you remove all that reading and just open and close the file? Does that still crash?

    I wasn't aware that ifstream.open takes an std::string as parameter. Is that some kind of...
  14. Replies
    32
    Views
    2,661

    Crossfire, I can understand that this is quite...

    Crossfire, I can understand that this is quite frustrating. C++ isn't easy. But you need to start with the small (or not so small) basics like header files and classes. A project that dynamically...
  15. Replies
    32
    Views
    2,661

    You have named your functions and variables...

    You have named your functions and variables alike. Give them proper names and your compiler error will vanish.

    t_func4 is a bad name. Tells nothing. How about function_OpenDevice_t or...
  16. Replies
    32
    Views
    2,661

    I think you have a tendency to take a huge...

    I think you have a tendency to take a huge project to solve a small problem. That backfires. If you encounter a problem, build the smallest compilable example and solve your problem there, then...
  17. Replies
    5
    Views
    985

    I'm not sure if that is the Qt way of doing this,...

    I'm not sure if that is the Qt way of doing this, but you could create a private field called "int DialogResult" and a method "int GetDialogResult() const" that will return that field in your...
  18. int Shapes::setButtonColor(int buttonColor) { ...

    int Shapes::setButtonColor(int buttonColor)
    {
    this->buttonCOLOR = buttonCOLOR;
    return buttonCOLOR;
    }


    Check your capitalization. Your method parameter is never used. Instead you...
  19. Replies
    4
    Views
    2,617

    Please note that we have a homework policy...

    Please note that we have a homework policy. You may get useful answers if you show some effort on your end. We will help you with specific problems you encounter while doing your homework, we will...
  20. Replies
    8
    Views
    1,636

    It depends on the JITter. Some cache their...

    It depends on the JITter. Some cache their results so it's only compiled the first time it's run. Some don't.
  21. Please note that you are using .NET in a C++...

    Please note that you are using .NET in a C++ program. Although not evil by itself, you are making this a lot harder than it has to be. C++/CLI (using .NET from C++) was made for exceptional cases...
  22. Replies
    2
    Views
    1,339

    I found it good practice to specify the default...

    I found it good practice to specify the default parameter in the prototype and comment it out in the body:



    void gui::addMenuButton(int x, int y, string name, int parent /*= -1*/){
  23. Replies
    2
    Views
    1,927

    Maybe your current AppDomain has other assemblies...

    Maybe your current AppDomain has other assemblies "assemblyName" depends upon already loaded? Did you reference any assemblies in your current app domain that aren't automatically loaded on new...
  24. Replies
    4
    Views
    1,840

    If you uncheck this checkbox, you just get rid of...

    If you uncheck this checkbox, you just get rid of the top folder and end up with this:

    Solution1.sln
    Solution1
    +-Project1
    +-Project2
    +-Project3

    Which is even worse :( However, the solution...
  25. Replies
    28
    Views
    5,375

    The main difference and my only problem with the...

    The main difference and my only problem with the same idiom in C++ is that in C# the using construct is a very clear communication of intent. I'm using( ... ) a specific variable and I want it gone...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4