Jump to content

The hello Thread


wetelectric
 Share

Recommended Posts

Hey season two episode three is here. If you have been a long time watcher but have not really participated in the hak.5 community, post here and say hello...

:)

People with 10 posts or less...post! This is your time! Evey realease day we need a thread like this. So come on! . :lol:

Link to comment
Share on other sites

printf("Hello, World!");

not this again

/*

Copyright (C) 2006 Garda



This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.



This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

GNU General Public License for more details.



You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.*/





#include <iostream>

using namespace std;



class output1

{

    public:

    void message1();

};



void output1::message1

{

    return "hello world!n";

}



int main()

{

    output1.message1();

    return 0;

}

Link to comment
Share on other sites

/*

Copyright (C) 2006 Garda



This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.



This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

GNU General Public License for more details.



You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.*/





#include <iostream>

using namespace std;



class output1

{

    public:

    void message1();

};



void output1::message1

{

    return "hello world!n";

}



int main()

{

    output1.message1();

    return 0;

}

lots more stylish, if ridiculous for this task

Link to comment
Share on other sites

I'm totally embarrassed.

That hello world not only doesn't compile. It's extremely n00bish and full of mistakes.

#include <iostream>

using namespace std;



class output1

{

    public:

    void message1();

};



void output1::message1()

{

    cout << "hello world" << endl;

}



int main()

{

    output1 class1;

    class1.message1();

    return 0;

}

This code actually compiles

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...