Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.22 seconds.

  1. Replies
    12
    Views
    133

    Some thoughts. 1. Your functions are too long....

    Some thoughts.
    1. Your functions are too long.
    2. Your functions are working at too low a level.

    All that *3, +4, % this, / that, +/- padding is clouding the issues.

    You NEED abstraction....
  2. > My routine is crashing when trying to perform...

    > My routine is crashing when trying to perform analog weighing signal reading, using the ADS1231 library.
    > Probably some pointer error, could you help me?
    Instead of speculation, run the program...
  3. Thread: Struct errors

    by Salem
    Replies
    1
    Views
    73

    There is no = on line 4.

    There is no = on line 4.
  4. > printf("\nnode data = %d node address = %p\n",...

    > printf("\nnode data = %d node address = %p\n", root->data, &root);
    Remove the & from the last parameter.
  5. I think you might be better off asking that...

    I think you might be better off asking that question on the virtualbox forums.

    Are these files present in your VirtualBox VMs\foo directory (where foo is your virtual machine name)?
    foo.vbox...
  6. I'd much rather read the code in a github than...

    I'd much rather read the code in a github than watch 15 minutes of you waffle on about your life history and watching you type code.
  7. Replies
    5
    Views
    204

    With few exceptions, when a process terminates,...

    With few exceptions, when a process terminates, all the resources held by that process will be freed.

    So if repeated runs of ancillary are presently fine in that respect, then system("ancillary...
  8. Serial Port (RS -232) Connection in C++ - Stack...

    Serial Port (RS -232) Connection in C++ - Stack Overflow
  9. The printf() function itself isn't a problem. ...

    The printf() function itself isn't a problem.

    The context however is
    - you might have nowhere for the output to be visible.
    - if you do have an output, say a serial line, it might be tediously...
  10. Replies
    5
    Views
    204

    Do the ancillary programs stop themselves when...

    Do the ancillary programs stop themselves when your main program stops the power supply?

    > --to put it simply, I want to start the ancillary tasks as though I entered them separately from the...
  11. I can see we're going to end up doing all your...

    I can see we're going to end up doing all your work for you.

    I really hope you're not being employed to write a POS system, because you're way out of your depth.
    Many weeks of catch-up and hard...
  12. 1->2->3->4->5->6->7->8->9->10->11->12->13->14->15...

    1->2->3->4->5->6->7->8->9->10->11->12->13->14->15
    An ordered linked list is also a binary tree. All the left-nodes are empty.
    It's a rubbish tree, because it's nowhere near balanced.
    It's depth...
  13. Replies
    12
    Views
    160

    > my files are text but quite large, as in...

    > my files are text but quite large, as in several gigabytes, so a copy, which doubles the ram usage
    Why do you need the whole file in memory at the same time?

    How much time is spent processing...
  14. Replies
    13
    Views
    359

    Show some code. Did you forget to multiply by...

    Show some code.

    Did you forget to multiply by sizeof(type) when you called malloc?
  15. Replies
    12
    Views
    160

    Seems to work for me, running the code with it's...

    Seems to work for me, running the code with it's own source file.


    $ ls -l bar.cpp
    -rw-rw-r-- 1 sc sc 577 Jun 10 06:08 bar.cpp
    $ g++ -std=c++11 bar.cpp
    $ ./a.out
    #include <iostream>...
  16. Replies
    6
    Views
    123

    There are two kinds of getline. getline...

    There are two kinds of getline.

    getline (string) - C++ Reference
    This one operates exclusively on strings.

    istream::getline - C++ Reference
    This one works with char pointers.
  17. Meh, ignore that last comment of mine.

    Meh, ignore that last comment of mine.
  18. It's commas all the way, except for the final...

    It's commas all the way, except for the final and.
    Eg
    Twenty two million, three hundred and forty thousand, nine hundred and seventy six.
  19. Replies
    8
    Views
    217

    That's fine. The cast is redundant though.

    That's fine.
    The cast is redundant though.
  20. Replies
    6
    Views
    123

    Maybe post something which compiles. You can't...

    Maybe post something which compiles.

    You can't just write random lines of code inside the class. It has to be in a function.
  21. > Notice, I'm not qualifying the numbers as in...

    > Notice, I'm not qualifying the numbers as in "two thousand dollars"...
    The plural goes to the subject.

    You don't say "two thousands dollar" for example.
  22. > And there is the conjunction "and". Example:...

    > And there is the conjunction "and". Example: 2345 = two thousands, three hundreds and forty five.
    > This "and" can happen more than once. Example: 123456: one handred and twenty three thousands,...
  23. I suspect you won't like this answer, but 40 is...

    I suspect you won't like this answer, but 40 is spelt "forty".

    I get 21124 with the correct spelling.

    Ironically, your original numeric case statement had the right number of characters.
  24. But it doesn't work does it.

    But it doesn't work does it.
  25. You seem to be double-counting some numbers. ...

    You seem to be double-counting some numbers.


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    #define HUNDRED_AND 10
    #define HUNDREDS 7
    #define THOUSAND 11
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4