Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: razzle

Page 1 of 9 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    13
    Views
    345

    Re: C++ with OOP assignment

    I agree. Still I would like to give the teacher one point for the implementation idea. But then I immediately withdraw it again for the dire design implications. Singletons shouldn't be promoted so...
  2. Replies
    13
    Views
    345

    Re: C++ with OOP assignment

    Finally a newbie C++ course with a high OO content! It certainly beats the traditional endless toiling over copy constructors and copy assignment operators that scare budding programmers off to Java...
  3. Replies
    13
    Views
    345

    Re: C++ with OOP assignment

    I wasn't aware of this way of creating rudimentary Singletons but it seems to protect quite well against multiple instantiation by accident. And Stroustrup has stated that protection against...
  4. Re: Something weird in Qt Creator 3.1.2 based on Qt 5.3.1

    You could copy and rename the cpp file outside of the IDE, then completely remove/delete the old cpp file from within the IDE, and then finally introduce the copied renamed file into the IDE. This...
  5. Replies
    13
    Views
    345

    Re: C++ with OOP assignment

    In this line,

    class Pens : public WritingInstruments

    public is the inheritance access specifier. You should not change that.

    You should change the member access specifiers though to public....
  6. Replies
    4
    Views
    2,356

    Re: Symbolic transformations

    The method is simple in principle.

    You build a tree representing the equations. Then you transform the tree to conform to your wanted representation of the equations.

    Usually the...
  7. Re: Debugging C++ code(Displaying char string per character)

    The * in this line

    *CopyOfName++;

    doesn't do anything. The result will be this,

    CopyOfName++;

    (which probably is what you wanted but still).
  8. Replies
    5
    Views
    4,927

    Re: what's wrong with this program

    Plenty. It's generally considered bad programming practice to have global data (state).

    http://c2.com/cgi/wiki?GlobalVariablesAreBad
  9. Replies
    5
    Views
    5,496

    Re: How divide cell?

    Note that it's generally assumed that examples describe what you want to achieve and not what you don't want. If you post failed attempts you must say so otherwise people get confusted as to what it...
  10. Re: A meaningful way of accessing a table by container

    If you want to use containers efficiently get the C++ Standard Library by Josuttis, second edition.

    You'll find direct replacements for QMap there. You could also play it simple and store the...
  11. Replies
    9
    Views
    6,373

    Re: Making an octagon out of right triangles

    I'm pretty certain this doesn't work with a regular octagon (fully symmetric and equally long sides L). I suspect your solution works only if the diagonal sides in your picture have length sgrt(2)*L...
  12. Replies
    9
    Views
    6,373

    Re: Making an octagon out of right triangles

    ---
  13. Replies
    1
    Views
    2,512

    Re: C++ Cross-Platform Compatibility

    If you stick to standard C++ your programs will be highly portable between platforms even though for the time being not all major compilers are feature complete up to the latest C++ 11 version of the...
  14. Re: Book recommendation for Windows Desktop User Interface/Shell programming?

    Are you scared you may be downloading a virus infested distribution or are you scared the gadgets themselves may have built-in malign properties that will kick into action once integrated into your...
  15. Replies
    5
    Views
    5,496

    Re: How divide cell?

    The criteria for division is not clear.

    In the right picture an area with a green perimeter has been subdivided with red borders but according to which rules? It cannot be that the division...
  16. Replies
    9
    Views
    6,373

    Re: Making an octagon out of right triangles

    You're wellcome.

    I know it's an exercise but note that representing an octagon with 16 right triangles is very inefficient. All it takes are two points, the centre point and one perimeter corner...
  17. Re: C++ advantages over Block Programming Environments(scratch or AppInventor)

    Programming languages can be broadly categorized as either domain-specific or general-purpose and the ambition of course is that a domain language such as Scratch should be more efficient in its...
  18. Replies
    9
    Views
    6,373

    Re: Making an octagon out of right triangles

    It's easier with a picture but I'll try in words.

    To get an octagon you inscribe a circle with 8 isosceles triangles. The angle between the equal sides of the triangles will be 45 degrees (8 time...
  19. Re: C++ advantages over Block Programming Environments(scratch or AppInventor)

    I hadn't heard about it either but here's an explanation and a list,

    http://blog.acthompson.net/2012/12/programming-with-blocks.html

    Don't miss the comments they're quite informative (and funny...
  20. Re: How to create a unmodifiable/read-only list in Java?

    Check out a class called Collections in the Java standard library. Among other stuff it provides wrapper classes that turn ordinary collections into readonly collections. See the unmodifiableList...
  21. Replies
    4
    Views
    1,367

    Re: memory capturing

    Well, a tool like this most likely would have a probe part and a control & analysis part. The probe would be integrated into the target computer as non-intrusively as possible and it would most...
  22. Re: Why certain projects always roll their own data structures/utility classes?

    But note that providing custom allocators to STL containers is the standard.

    You can quite easily supply your own memory management for individual containers if you have special needs such as...
  23. Re: Why certain projects always roll their own data structures/utililiy classes?

    An ongoing example of this is the highlevel libraries built on top of C++ 11 threading, like parallel looping and threadsafe containers. They'll most likely end up in the standard eventually but...
  24. Replies
    6
    Views
    2,856

    Re: Which time complexity is true?

    A recursive C++ function would look like this,



    double F(int n) {
    if (n<=0) {
    return 1.0; // assumed terminal value
    } else {
    return sqrt(F(n/2) + F(n/2)); // recursive...
  25. Re: How to program boolean union and intersection in C++?

    One very efficient set representation is the bitset. Here the individual bits of an integer are used to represent set elements. If the n'th bit of the integer is set then the n'th element of the set...
Results 1 to 25 of 212
Page 1 of 9 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center