Search:

Type: Posts; User: GeneralZod; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    2
    Views
    437

    Re: C++ weird calculations

    As a clue: if you enter:

    10<enter>

    getline will eat up the <enter> (though the <enter> won't appear in userInput - it is discarded). What then will be the effect of the subsequent call to...
  2. Replies
    8
    Views
    800

    Re: Qt:Add a tab to QtabWidget

    You don't appear to be initialising uimain anywhere.
  3. Replies
    2
    Views
    509

    [SOLVED] Re: printf executes before should

    That's actually not what is happening; add some strategic debugging statements to get a clearer view of what is going on, here :)
  4. Re: Need help selecting programming language for *inux development java vs python vs

    Pretty much the entirety of KDE (from toolkit - "Qt" - to practically all of its apps) are written in C++, as are popular apps such as Firefox, Chromium, Open/LibreOffice, Abiword etc. gcc was pure...
  5. Re: What Language; Compiler is best to write ubuntu application

    Unity is mostly C++:

    http://www.ohloh.net/p/ubuntu-unity/analyses/latest/languages_summary
  6. Re: C++ Conway's Game of Life - Cygwin Segmentation Fault (Core Dumped)

    First step: run it in gdb and find out what line it crashes on :)
  7. Replies
    8
    Views
    3,939

    Re: C++: map with custom compare

    class MyClass {
    public:
    MyClass(const int N_):N(N_), myMap(MapCompare(N)) {
    myMap.clear();

    };

    private:
    int N;
  8. Replies
    8
    Views
    3,939

    Re: C++: map with custom compare

    In your "for" loop, you only ever compare one pair of elements.

    Edit:

    Also, read this: you are disobeying the contract.

    http://www.cplusplus.com/reference/map/map/key_comp/
  9. Replies
    8
    Views
    3,939

    Re: C++: map with custom compare

    Please use code tags!

    The error is in the line:



    std::map<int*, int, MapCompare> myMap(MapCompare(N));


    Google for "most vexing parse".
  10. Replies
    6
    Views
    1,413

    [SOLVED] Re: C++, templates and arrays of pointers

    No problem :) clang's output is slightly better, but still doesn't quite get to the nub of the matter. Might file a bug report ...
  11. Replies
    6
    Views
    1,413

    [SOLVED] Re: C++, templates and arrays of pointers

    "&AppendOneOfThese [3]" is a temporary, and temporaries cannot be bound to non-const references.

    This works:




    #include <iostream>
    #include <cstring>
    /*!
  12. Re: Qt Text Editor crashing when saving/opening text files

    You aren't initialising your textEdit member variable declared in gui_output2.h (you initialise a local variable with that name in gui_output2::gui_output2()).
  13. Replies
    3
    Views
    2,020

    Re: Software in Person of Interest

    It's very similar, but not identical to Filelight:

    http://methylblue.com/filelight/
  14. Replies
    326
    Views
    65,605

    Re: Netflix On Ubuntu

    Interesting:

    http://www.theverge.com/2013/4/15/4228248/netflix-plans-its-move-from-microsoft-silverlight-to-html5-video
  15. Replies
    6
    Views
    1,092

    Re: Array of char problem. c++

    I've added some obvious corrections, but a lot of the code is too bewildering to fix, in which case I've left comments - they're meant to be friendly criticism, so please don't take offense :) //...
  16. Re: Should Canonical make KDE it's default desktop environment?

    Other way round: KDE + Qt have expended a lot of effort to make KDE apps fit in properly in GNOME (e.g. QGtkStyle; using GTK file dialogs in GNOME/ XFCE, etc). The other way round - GTK apps looking...
  17. Replies
    8
    Views
    799

    Re: C++ Making code work for a vector

    "partition" could be the one from the C++ Standard Library:

    http://www.cplusplus.com/reference/algorithm/partition/
  18. Replies
    12
    Views
    552

    Re: c++ exception handling

    This works only by fluke; you're still dereferencing a pointer to an object whose lifespan has ended: you got lucky that this implementation of C++ doesn't bother to "destroy" unsigned ints declared...
  19. Replies
    12
    Views
    552

    Re: c++ exception handling

    I'm guessing C++ handles the "MyType var[3]" in the catch clause in the same way that it handles it in a parameter list - by treating it as MyType*. Coupled with this, from the spec:



    So...
  20. Re: C++, dynamic_cast and language bindings

    I just checked out the source for gtkmm and can confirm that Gtkmm::Button inherits from Gtkmm:Bin, as suggested here (inheriting from Gtkmm::Activatable is marked as TODO) - so based on this...
  21. Replies
    5
    Views
    1,576

    Re: C++ (gnu) Reference to Pointer

    spjackson's suggestion compiles fine, here. Is the code in the OP copy-and-pasted? If so, you have a rogue "," before the closing bracket.
  22. Replies
    9
    Views
    581

    Re: Help for creating a basic Editor

    *coughs* ;)
  23. Thread: C# or Qt?

    by GeneralZod
    Replies
    1
    Views
    1,360

    Re: C# or Qt?

    C# has Qt bindings (though I don't know how well they work and whether they are still maintained), so it's not necessarily either-or.
  24. Replies
    15
    Views
    653

    Re: Portin from Python to C++

    Add "and they aren't given a parent", and that sounds like a good rule - I can't think of any exceptions offhand.
  25. Replies
    15
    Views
    653

    Re: Portin from Python to C++

    window isn't given a parent, so Qt doesn't delete it for you - therefore, it's safe to handle destruction yourself. May as well just allocate it on the stack :)
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4