Results 1 to 18 of 18

Thread: #3 attempt at learning c++

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default #3 attempt at learning c++

    attempt #3 at learning c++

    first time I was in the 7th grade (5 years ago) (for non Americans that's around age 12-13)
    second time was like 4 months ago


    never actually got serious but I'm downloading eclipse for c++ ( @Brandon umad? ) because I'm the most familiar with it


    Any tips on what stuff I should make? (It's a shame there no c++ based bot for RS otherwise this would be a lot more easy)

  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    As much as I love eclipse I would recommend code::blocks. Also get yourself a good compiler (MinGW). i consider those two to be essential when coding c/c++.
    http://www.codeblocks.org/
    http://www.mingw.org/

    On a side note, Brandon has always told me to get the latest MinGW of sourceforge.
    http://sourceforge.net/projects/ming...dows/releases/ -> Latest Version -> Word Length -> Posix -> sjlj -> latest revision
    then just copy the contents of the folder so it looks like "C:/mingw/bin" in your c drive. or you could just get the installer, i personally find the sourceforge method alot easier.

    Another thing you could look into is Msys. (Minimal System), i dont consider it essential but its nice to have since many of the projects at villavu that aren't coded in lape / ps such as smart and brandon's GLX (up until a couple hours ago) use Msys to compile.

    Edit :

    *cough* @Brandon;*cough*

    Quote Originally Posted by Officer Barbrady View Post
    (It's a shame there no c++ based bot for RS otherwise this would be a lot more easy)
    Last edited by Kasi; 10-27-2013 at 04:11 AM.

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    First off how do I run a hello world program?



    I'm just doing

    c++ Code:
    #include <iostream>
    using namespace std;

    int main ()
    {
      cout << "Hello World!";
      return 69;
    }

  4. #4
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    First off how do I run a hello world program?
    maybe try clicking the down arrow next to the play button and click the correct project? if everything is as it should be your compiler should find the entry point through your source just fine.

    Edit: another thing; Please don't use java conventions such camel casing in c++.

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Kasi View Post
    maybe try clicking the down arrow next to the play button and click the correct project? if everything is as it should be your compiler should find the entry point through your source just fine.


    same error

  6. #6
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post


    same error
    did you build it? what does the little hammer do? i dont have Eclipse C++ on this system and look at my first post.

  7. #7
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Kasi View Post
    did you build it? what does the little hammer do? i dont have Eclipse C++ on this system and look at my first post.
    yea I used the hammer to build it

  8. #8
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    yea I used the hammer to build it
    Ha! Who's mad now? huh?!

    http://stackoverflow.com/questions/9...r-c-in-windows

    Read that. That's how you fix it. See if you didn't use eclipse, you wouldn't have this problem of going through a whole setup..
    I am Ggzz..
    Hackintosher

  9. #9
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I'll stop after this much (@OP):
    A book will allow you to learn. Learning before leaping.
    End of my input.

  10. #10
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    Ha! Who's mad now? huh?!

    http://stackoverflow.com/questions/9...r-c-in-windows

    Read that. That's how you fix it. See if you didn't use eclipse, you wouldn't have this problem of going through a whole setup..
    Code blocks isn't printing hello world though

    it can't find the compiler





    no idea why...

  11. #11
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Code blocks isn't printing hello world though

    it can't find the compiler

    no idea why...

    I have mine as:



    This setup also works just fine as well; though I prefer the above:


    You should get used to setting up a toolchain.

    Basically works like this. It needs to find gcc.exe and g++.exe within your mingw64/bin folder.
    What you can do is click the button that has the [...] and select the right exe.

    For C, you want to select the one ending in gcc.exe.
    For C++, you want to select the one ending in g++.exe.
    For linking dynamic libs, you want to select the one ending in g++.exe.


    These usually begin with x86_64 <--64 bit compiler or i386 <-- 32 bit compiler.
    Last edited by Brandon; 10-27-2013 at 02:47 PM.
    I am Ggzz..
    Hackintosher

  12. #12
    Join Date
    Mar 2006
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    learning to program c in ubuntu is more fun imo



    Dont Steal..

  13. #13
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    I'll stop after this much (@OP):
    A book will allow you to learn. Learning before leaping.
    End of my input.
    ^ This.
    @Officer Barbrady; you should purchase a book on the C++ language. It will do you wonders.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  14. #14
    Join Date
    Oct 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Codeblocks is much better IMO. There is a binary with g++ built-in

    sourceforge.net/projects/codeblocks/files/Binaries/12.11/Windows/codeblocks-12.11mingw-setup_user.exe

    Print "Hello world" code:

    Code:
    #include <iostream>
    using namespace std;
    
    int main(){
    
        cout << "Hello World";
        return 0;
    }
    Try that

  15. #15
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Why not use Visual Studio? It's very user friendly, especially for first timers.
    Last edited by kingarabian; 11-10-2013 at 02:09 AM.
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

  16. #16
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by kingarabian View Post
    Why not use Visual Basic? It's very user friendly, especially for first timers.
    Because I don't want to download a 4gb file with slow internet

  17. #17
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    Quote Originally Posted by kingarabian View Post
    Why not use Visual Basic? It's very user friendly, especially for first timers.
    Surely you mean Visual Studio not Visual Basic

  18. #18
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Yeah I did, excuse me.
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •