Search:

Type: Posts; User: nadamson6

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    2,174

    thanks salem... the actual loop is doing much...

    thanks salem... the actual loop is doing much more and the depth limit is working well. i think i may also use getrlimit and monitor the memory usage.
  2. Replies
    11
    Views
    2,174

    Re: seg fault problems

    Finally a intelligent and informative response. Thanks Salem for your knowledge and excellent response.

    Although my example looks silly and your non-recursive function fits my example code much...
  3. Replies
    11
    Views
    2,174

    Re: seg fault problems

    thanks for all the wonderfull help.....
    i will name my vars how i wish... thank you.

    how is this an infinite loop? i must be missing something!??
    are you saying it is because of the long...
  4. Replies
    11
    Views
    2,174

    seg fault problems

    my program was generating a "Segmentation fault" and i finally narrowed down where it was occuring. i have developed a simple program below that re-creates the seg fault.

    the seg fault occurs...
  5. Replies
    7
    Views
    964

    I am currently using FreeBSD unix... but I would...

    I am currently using FreeBSD unix... but I would like to control it on any *nix. Also I am using GCC 3.45.

    Thanks
  6. Replies
    7
    Views
    964

    controlling the processor resources

    Does anyone know how I can keep my program from using 99% of my cpu percentage every time I run it? Is there a way to set some kind of limit, like say 10%?

    I have looked at <sys/resource.h>...
  7. Replies
    18
    Views
    19,004

    Thanks for all the input on this subject. ...

    Thanks for all the input on this subject.

    okinrus: I believe you are correct in your example showing that the global will have to be reloaded.

    Ancient Dragon: You are correct in that I did not...
  8. Replies
    18
    Views
    19,004

    I wrote two simple programs.... one using globals...

    I wrote two simple programs.... one using globals and one using local variables with pointers.

    The global var program ran about twice as fast as the local var program on my cpu.


    ...
  9. Replies
    18
    Views
    19,004

    Ancient Dragon: I agree completely about the...

    Ancient Dragon: I agree completely about the "function algorithms". However, I am not writing a simple "hello world" application. I am trying (and having fun) to write a very complicated...
  10. Replies
    18
    Views
    19,004

    Very true dave... However, I would rather find...

    Very true dave... However, I would rather find out the truth on this issue than integrating the private static variable into my code and finding out it's too slow and having to re-write everything.
    ...
  11. Replies
    18
    Views
    19,004

    Here are few results from a quick google search:...

    Here are few results from a quick google search:
    http://www.codeproject.com/cpp/C___Code_Optimization.asp

    http://publib16.boulder.ibm.com/pseries/en_US/aixbman/prftungd/perfplanning4.htm
    ...
  12. Replies
    18
    Views
    19,004

    Hmmm... I guess I believed globals decrease...

    Hmmm... I guess I believed globals decrease performance because that was what I was always taught and read in books.

    Here is a quote from one of my c++ books (2 years old):


    This is just one...
  13. Replies
    18
    Views
    19,004

    static class variable vs. global variable

    I believe I understand most of the negative impact that global variables have on a program. One major issue is their negative effect on your program's performance.

    I am at a point in my program...
  14. That was it! Thanks for the info! Yep, I...

    That was it! Thanks for the info!

    Yep, I already had a bool set... just testing in the constructor until I had the syntax worked out.

    Thanks again!
  15. Now that my define is working... I can't get it...

    Now that my define is working... I can't get it to initialize.

    I trying to initialize it in my constructor:

    myCounter[0] = new myClass::Test;
    (*myCounter[0]).xCount = 0;

    I am...
  16. Thanks for the help! I did what you said: ...

    Thanks for the help!

    I did what you said:


    myClass::Test myClass::*myCounter[10];

    But the compiler errored and said struct Test was protected. I made the only struct definition public...
  17. how to initialize a static pointer array in a class?

    Hello,

    I don't know how to initialize a static pointer array in a class.

    I wish to write something like the following code only with a class:



    struct Test{
    int xCount;
Results 1 to 17 of 17