Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4f081a4ef037090001000074

constructor

coding a constructor for a simple class

Start file
class SongEntry
{
public:
    SongEntry
        (
        QString mSinger = QString(),
        QString mSongName = QString(),
        QString mGender = QString(),
        QString mSongLang = QString(),
        int mSongLength = 0,
        QString mSongPath = QString(),
        QString mNotes = QString()
        );

private:
    int mId;
    QString mSinger;
    QString mSongName;
    QString mGender;
    QString mSongLang;
    int mSongLength; // in seconds
    QString mSongPath;
    QString mNotes;
};

===========================================================
End file
class SongEntry
{
public:
    SongEntry
        (
        QString mSinger = QString(),
        QString mSongName = QString(),
        QString mGender = QString(),
        QString mSongLang = QString(),
        int mSongLength = 0,
        QString mSongPath = QString(),
        QString mNotes = QString()
        );

private:
    int mId;
    QString mSinger;
    QString mSongName;
    QString mGender;
    QString mSongLang;
    int mSongLength; // in seconds
    QString mSongPath;
    QString mNotes;
};

===========================================================

SongEntry::SongEntry
    (
    QString aSinger,
    QString aSongName,
    QString aGender,
    QString aSongLang,
    int aSongLength,
    QString aSongPath,
    QString aNotes
    )
    : mSinger( aSinger )
    , mSongName( aSongName )
    , mGender( aGender )
    , mSongLang( aSongLang )
    , mSongLength( aSongLength )
    , mSongPath( aSongPath )
    , mNotes( aNotes )
{
}

View Diff

26a27,46
> 
> SongEntry::SongEntry
>     (
>     QString aSinger,
>     QString aSongName,
>     QString aGender,
>     QString aSongLang,
>     int aSongLength,
>     QString aSongPath,
>     QString aNotes
>     )
>     : mSinger( aSinger )
>     , mSongName( aSongName )
>     , mGender( aGender )
>     , mSongLang( aSongLang )
>     , mSongLength( aSongLength )
>     , mSongPath( aSongPath )
>     , mNotes( aNotes )
> {
> }

Solutions by @yoyoyojomo:

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @Arton0306

60 active golfers, 182 entries

Solutions by @yoyoyojomo:
99
#33 - Jomo / @yoyoyojomo

03/14/2012 at 07:50AM