Search:

Type: Posts; User: Dave++

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. confirm multi to one row code?

    Way back when...quzah wrote:


    for( x = 0; mdarray[x][0]; x++ )
    foo( array[x] );

    return 0;


    was array[x] supposed to be mdarray[x]?
  2. Replies
    6
    Views
    1,478

    build some classes

    > I am also free to choose a language and so decided for C++, because I want to collect some experience with it...

    Wow, I was there once...

    Consider creating some classes that contain things...
  3. Replies
    3
    Views
    939

    forcing signed into unsigned

    Why isn't this working...?

    Yes, I am trying to force signed into unsigned.
    By dereferencing the LHS I hope to accomplish the conversion.
    It's the segmentation fault that concerns me.
    I'm...
  4. Replies
    9
    Views
    3,149

    organized thoughts

    Hunter, when I first learned about "flowcharts" in third grade...I flowcharted everything. "How to sharpen a pencil" and even "How to take a c___". That was 1970. And so there sat a bunch of boxes...
  5. Replies
    28
    Views
    3,081

    13 levels of pointers

    I remember hearing from a friend about a math major where he worked and that when the math major discovered pointers he wrote a program with 13+ levels of indirection.

    He kept complaining to his...
  6. Replies
    38
    Views
    9,180

    animaniac?

    Brad,
    What's your major in school? Have you seen Matrix Revolutions and its "the making of" on the companion CD?
    After working as an engineer for 15 years I was depressed for half a year after...
  7. Thread: debugging

    by Dave++
    Replies
    13
    Views
    2,120

    My professor found an interesting site that...

    My professor found an interesting site that discusses nanosleep and the accuracy of gettimeofday.

    http://defectivecompass.wordpress.com/2006/09/01/high-precision-sleep/

    code included
  8. Thread: Java vs. C++

    by Dave++
    Replies
    13
    Views
    2,744

    I'm doing C++ in Unix on a hardware effort, but...

    I'm doing C++ in Unix on a hardware effort, but I'll be using Java in Eclipse to develop cross platform apps from my MAC.

    The cost in time and overhead to learn multiple IDE's and multiple...
  9. Thread: debugging

    by Dave++
    Replies
    13
    Views
    2,120

    calculate program's execution...answer?

    You may be able to use the gettimeofday(...) function from within a script because its listed in the man pages. Then when the routine returns to the script you can hit the stop watch from within the...
  10. Thread: debugging

    by Dave++
    Replies
    13
    Views
    2,120

    Too Many Clocks and You Won't Know What Time It Really IS !

    This routine does it all...
    It compares all the routines that are easily accessable.

    Dave



    Please, enter your name: dave
    Hi dave.
    dif: It took you 4.0 seconds to type your name.
  11. Thread: debugging

    by Dave++
    Replies
    13
    Views
    2,120

    I know...

    Yes.............the compiler complained too ! :p
  12. Thread: debugging

    by Dave++
    Replies
    13
    Views
    2,120

    no usefull scope for DAQ

    My problem is that one timer only resolves in seconds at a system level and the other at a cpu level. Therefore I can't really use either timer if I'm doing mid-freq DAQ sampling where CPU time can't...
  13. Thread: debugging

    by Dave++
    Replies
    13
    Views
    2,120

    easily messed up?

    Mike,
    I've been working with the time and clock functions this past couple days and was glad to see this thread. I seem to have found lots of ways to keep it from working and I'll post some...
  14. Replies
    22
    Views
    3,371

    DWKS, Raigne, Thanks for the updates. I'll...

    DWKS, Raigne,
    Thanks for the updates. I'll be using them.

    Dave
  15. Replies
    22
    Views
    3,371

    the math way

    Alright, thanks for the code examples above.
    I will be studying them and will use them once I know and test them better.

    Below is the hardway in that it demonstrates the math and could be...
  16. Replies
    22
    Views
    3,371

    It's the code from Mike ...

    It's the code from Mike

    http://cboard.cprogramming.com/showthread.php?t=90911

    I modified to return std::string


    std::string strOut = std::string(str); // using Daved approach as shown...
  17. Replies
    22
    Views
    3,371

    MacGyver, Can you expand on your previous...

    MacGyver,
    Can you expand on your previous comment?

    More testing...
    In gdb I can comment out the call to the function, with a simple default value in its place, and then reset the DAQ...
  18. Replies
    22
    Views
    3,371

    On a related note: I am converting a number to...

    On a related note:

    I am converting a number to a string and would like to code...


    std::string DecToBin(int num);
    ...
    messageOut = "header 1: " + DecToBin(num);

    And for the last hour...
  19. Replies
    22
    Views
    3,371

    The examples for C++ (unlike those for c stings)...

    The examples for C++ (unlike those for c stings) hide the use of pointers which lead me to above usage (even at the link given).

    But clearly the link you gave shows that the arguments (even if...
  20. Replies
    22
    Views
    3,371

    simple but not working

    Why would the following give an error as shown?



    std::string messageOut = "header 1: " + "test";

    error: invalid operands of types `const char[11]' and `const char[5]' to binary `operator+'
    ...
  21. Thread: itoa in C++

    by Dave++
    Replies
    9
    Views
    3,614

    > but originally it is a bitwise operator ...

    > but originally it is a bitwise operator

    Thanks to all.
  22. Thread: itoa in C++

    by Dave++
    Replies
    9
    Views
    3,614

    Mike, Thanks for the code. I ran it on my end...

    Mike,
    Thanks for the code. I ran it on my end with no problems and it will integrate well into my application.

    dave.thanks(10^6);
    PS: found an error...won't work for zero :(
    So added this at...
  23. Thread: itoa in C++

    by Dave++
    Replies
    9
    Views
    3,614

    Also, This code...could it be made to work...

    Also,
    This code...could it be made to work with integers easily?
    I am trying to go from an integer to binary to a string.

    ...
  24. Thread: itoa in C++

    by Dave++
    Replies
    9
    Views
    3,614

    What is the best way to implement IOTA in CPP ?...

    What is the best way to implement IOTA in CPP ? Using CPP Standards?

    Given the following...I'd like to return a character version of a library call.


    std::string...
  25. Thread: fprintf vs fout

    by Dave++
    Replies
    4
    Views
    2,203

    FYI - if you think of each line as a column, it...

    FYI - if you think of each line as a column, it helps in organizing code layout.



    fout << dec << "Item: ";
    fout.width(3); fout << left << j << " Counts: ";
    ...
Results 1 to 25 of 42
Page 1 of 2 1 2