Search results

  1. S

    A Simple C Question

    How is the complexity (n log n)? Its still linear - O(n). The worst case complexity of even linear search is O(n). This cannot be any worse! Basically, the search will not be called "binary search" if its done on lists
  2. S

    Scratch guards for mobile phone screens

    Hello, I own a RAZR V8 and I am very scared about the screens attracting scratches all the time. I've searched on the net and ebay has some scratch guards (thin film over the screens) for sale - any ideas if these are any good? Also, if these scratch guards are any good in protecting...
  3. S

    Pointer Magic

    I do not understand what is being done in the code! It seems flawed - use of uninitialized pointers, invalid pointer assignments, etc - care to explain?
  4. S

    Post your C/C++ Programs Here

    Re: Post ur C/C++ Programs Here I once needed to write a program that would modify a file based on certain parameters like: percentage of change, scatter changes over different extents, maximum length of a change extent, randomize changes, etc. To be efficient, the program needed to generate a...
  5. S

    Post your C/C++ Programs Here

    Re: Post ur C/C++ Programs Here This is something I never knew and read about it recently in "Exceptional C++". Let me start with a code example... namespace A { class S { }; void foo(S& parm) { } } namespace B { void foo(A::S& parm) { } void bar(A::S& parm) { foo(parm)...
  6. S

    help with c/c++

    Except for the second one, both 1 and 3 that you've given have undefined behavior. What this means that you cannot predict what the output would be and may vary on different compilers. This is because the same variable is being modified twice between 2 sequence points. For more details...
Top Bottom