Search:

Type: Posts; User: Niccolo

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    120

    @jonshouse, a quick 'tutorial' about this. As...

    @jonshouse, a quick 'tutorial' about this.

    As @salem points out, this is about pointer arithmetic.

    I thought it may be useful to see how that works in two primary forms.

    First, to be clear...
  2. Replies
    11
    Views
    222

    @laserlight, After reading Meyer's replies on...

    @laserlight,

    After reading Meyer's replies on the linked page, I now come to see Meyers is the origin of the term "Universal References", and they were not called that when the notions of...
  3. Replies
    11
    Views
    222

    @laserlight, It took a while, but I found...

    @laserlight,

    It took a while, but I found something. This is not the actual text I read back in the day (but it was very similar), but Meyers (one of those I mentioned) uses this phrase here:...
  4. Replies
    2
    Views
    91

    No idea. Post the code using code tags, not a...

    No idea.

    Post the code using code tags, not a screenshot. We have to see what the compiler sees, not your desktop.
  5. Replies
    2
    Views
    140

    Well, this: do { money =...

    Well, this:


    do {

    money = get_float("Change owed: ");

    change = round(money * 100);

    }
  6. Replies
    11
    Views
    222

    It's been years, but way back before C++11 when...

    It's been years, but way back before C++11 when Boost was offering a "REF" macro for parameter forwarding, I had a book discussing boost which brought it up.

    The subject was what happened when...
  7. Replies
    11
    Views
    222

    For C++, any recent book by Stroustrup, Meyers or...

    For C++, any recent book by Stroustrup, Meyers or Sutter will be among the most authoritative.

    The terms you listed are also titles from these authors.

    The C++ language underwent a major update...
  8. Replies
    7
    Views
    368

    The heart of this is ONES. Everything else...

    The heart of this is ONES.

    Everything else works off of it.

    Imagine a fine tooth comb with perhaps some missing teeth. Where there are teeth are the 1's. Where they're missing are zeros.
    ...
  9. @SuchtyTV, You should consider pthread_join...

    @SuchtyTV,

    You should consider pthread_join (in main, after the threads are created). This is done for each thread you launch. Without it, the create's return and nothing blocks the application...
  10. Replies
    4
    Views
    275

    @awwdert....I think that's actually copying the...

    @awwdert....I think that's actually copying the first element of the first array in b to the last element of the last array in a, but otherwise you're on point.

    I'm not sure what's "new" about...
  11. Replies
    4
    Views
    326

    The single best skill to learn about any language!

    The single best skill to learn about any language!
  12. Replies
    4
    Views
    326

    Since you ask about files on disk but your code...

    Since you ask about files on disk but your code sample doesn't create any files on disk, it's hard to make assumptions about what you're asking, doing or mean.

    If I assume that putchar in these...
  13. Replies
    7
    Views
    432

    He stated this has to be done before Saturday. ...

    He stated this has to be done before Saturday.

    Quick install of MS IDE, debugger works out of the box, get past the current problem, THEN get around to figuring out what's wrong with CodeBlock's...
  14. Replies
    7
    Views
    432

    @stahta01, Yet, that is somewhat...

    @stahta01,



    Yet, that is somewhat immaterial since using CLang/LLVM is a trivial part of installation and selection when configuring a project (VS 2017 & VS 2019). CLang might not be as current...
  15. Replies
    7
    Views
    432

    @letthem, Do you require GCC? If so, why? ...

    @letthem,

    Do you require GCC?

    If so, why?

    It's not that my question proposes GCC isn't a good compiler. GCC is famous for being first to implement new C++ standards, and more completely than...
  16. Tabular form may well be little more than...

    Tabular form may well be little more than including tabs in the format (check printf formatting and /t), but the problem of "a single line" may be your operating system convention. Windows usually...
  17. Replies
    10
    Views
    680

    I never thought about it after our last exchange....

    I never thought about it after our last exchange. I'll look to see if I still have that code. I usually keep all that I write, but on these forums I just grab an example console project, erase what's...
  18. On the general subject of recursion The...

    On the general subject of recursion

    The algorithm to traverse a binary tree you present is a typical recursive algorithm, though in two paths. First, to better understand recursion, one should...
  19. After 40+ years of writing in C and C++, I can...

    After 40+ years of writing in C and C++, I can tell you that you've been given incorrect information about the speed of goto vs while, for or do-while. Factually, there is either no difference at all...
  20. Here's where 'goto' is not your friend //...

    Here's where 'goto' is not your friend



    // Interrps the goto-loop when count is equal to MAX
    if(count<=MAX) {


    count++; index_file_name++; if(index_file_name>57) {
  21. Replies
    4
    Views
    426

    Hey @letthem, All that I see seems right to me...

    Hey @letthem,

    All that I see seems right to me at the moment, you got it.

    As to this (simplified) common idiom:


    struct link
    {
    link *next_ptr;
  22. Replies
    5
    Views
    359

    This: if(*payCategory == a1) Note:...

    This:


    if(*payCategory == a1)

    Note: payCategory is a character array (of length 2)

    a1 is a double, when I think you mean "A1", the text you expect the user to enter

    The problem is also...
  23. Replies
    1
    Views
    324

    These end up being instances of that struct, in...

    These end up being instances of that struct, in global scope. The struct itself isn't given a name, making it an unnamed struct with those instances.
  24. Replies
    4
    Views
    426

    First, to be safe one should not dereference a...

    First, to be safe one should not dereference a pointer without checking it first. doublepointer is a pointer, it just happens to point to a pointer. It could be null, which is to say you may need to...
  25. Replies
    9
    Views
    459

    I can't do better than @flp1969 at question 1. My...

    I can't do better than @flp1969 at question 1. My point in presenting the illustration was to get you thinking about two separate levels implied by the use of such pointers. There is the compile time...
Results 1 to 25 of 182
Page 1 of 8 1 2 3 4