Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Simple Inheritance

@Simple Inheritance
About
Posts
11
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • So you think you can tell
    S Simple Inheritance

    Trolls have testicles.°°

    The Lounge com tools question

  • Space is Big
    S Simple Inheritance

    Makes me think the lack of water in the universe is dismal. X|

    The Lounge com question

  • sorting an STL list of =references= to objects
    S Simple Inheritance

    BUG: The STL list::sort() Function Doesn't Sort a List of Pointers http://support.microsoft.com/default.aspx?scid=kb;EN-US;q265109 The Standard Template Library (STL) list::sort function doesn't sort a list of pointers when a predicate function is defined for sorting. VC6 is a ten-year old compiler now. The bug is not present in VC2008 or MinGW. Your code is implemented below with the workaround described in KB265109. ________________________________________________________________________________________ #include <iostream> #include <string> #include <list> using namespace std; struct pstchip_pin_wor {       string primitive;       string pin_name;       string pin_number;       pstchip_pin_wor( string aa, string bb, string cc)       {             primitive   = aa;             pin_name   = bb;           pin_number = cc;      }       pstchip_pin_wor& pstchip_pin_wor::operator= (const pstchip_pin_wor &itemToCopy)       {             if(&itemToCopy != this)           {                this->primitive   = itemToCopy.primitive;                this->pin_name   = itemToCopy.pin_name;                this->pin_number = itemToCopy.pin_number;           }           return *this;      }      int pstchip_pin_wor::operator == ( const pstchip_pin_wor& itemToCompare) const      {           if( this->primitive == itemToCompare.primitive   && this->pin_name   < itemToCompare.pin_name )                return 1;           return 0;      }      int pstchip_pin_wor::operator   < ( const pstchip_pin_wor&

    ATL / WTL / STL c++ algorithms css graphics

  • sorting an STL list of =references= to objects
    S Simple Inheritance

    You fattened the parameters of compareFunc with const specifiers. It works when you remove them. If you want to define compareFunc with const parameters:

    static bool compareFunc( const pstchip_pin_wor* a, const pstchip_pin_wor* b)

    then you have to define the operator < as a const member:

    bool operator < ( const pstchip_pin_wor& itemToCompare) const

    modified on Wednesday, December 2, 2009 5:13 PM

    ATL / WTL / STL c++ algorithms css graphics

  • sorting an STL list of =references= to objects
    S Simple Inheritance

    If you really need to maintain a list of pointers, you can add one user-defined function (as global or as static member to the class) that compares two objects with pointers to them as parameters.

    static bool less_than(pstchip_pin_wor* elem1, pstchip_pin_wor* elem2)
    {
    return *elem1 < *elem2;
    }

    Then you use the sort with the user-defined function as parameter.

    wors_pstchip_pins.sort(pstchip_pin_wor::less_than);

    ATL / WTL / STL c++ algorithms css graphics

  • IDE
    S Simple Inheritance

    han. Qt Creator, Codelite, Anjuta or code:block. Monodevelop can be used as a editor. Thank you.

    Linux, Apache, MySQL, PHP linux c++ visual-studio

  • It is a girl !
    S Simple Inheritance

    That's very mean. There are efficient ways to control child development now. Even later, it is possible to do much if desired. At any rate, it can look like a duck, it can quack like a duck, it's still a hen if it drops eggs. There are always men whom would be made happy.

    The Lounge

  • C++ Anyone?
    S Simple Inheritance

    That is what I will do. You feel part of some sort of nobility (albeit recognized only by your peers) when you can run the whole gamut of ATL, WTL, STL. It's the .Net Framework that killed C++ on Windows and only the framework. If librairies as complete and unified could enter the arena, the language would be revived by popular demand. But I am pessimistic. Nevertheless, although a chilly pain since its inception due to the asinian lack of librairies, C++ is still firmly anchored. It ages well and it remains definitely OK for cross-platform development (wxWidgets, Qt and others ...).

    The Lounge csharp c++ architecture question

  • Hardware server monitor?
    S Simple Inheritance

    I agree that the device is not that affordable. If you want to monitor from another computer, you can perform a remote monitoring of, for example, the "System" process of the monitored machine or an application of your own if required. This is possible with the Services API or via WMI (not exhaustive). Once sure that the OS is not responding, you can send a +5V signal using a data acquisition card on the monitoring machine and two wires plugged to the reset connector. Maybe I missed something ...

    The Lounge question sysadmin hardware

  • Hardware server monitor?
    S Simple Inheritance

    http://www.sophisticated.com/products/kick-off/kick-off.html Hope it helps ...

    The Lounge question sysadmin hardware

  • Iraq vs. Irak question
    S Simple Inheritance

    Everything is correct in all languages. Arabic names use arabic alphabet and characters, so each country with an other alphabet defines proprietary rules for the transcription, mainly in an effort to restitute pronunciation, marginaly by following old habits of writing. This is the same for russian or chinese, but also many others languages. So in french/english: Irak - Iraq Bagdad - Baghdad Bassorah - Basra Chiites - Shiahs Pékin - Beijing Moscou - Moskow There are exemples where history brought totally different names for same places: ex: english/german/french Germany / Deutchland / Allemagne In general, I remarked that english strips a lot, while french fattens.

    The Lounge question visual-studio com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups