+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    1,898,887.25
    Rep Power
    206

    Default SonniE's C++ Tutorial

    Im going to make a series of Beginners Tutorials for C++ programming since people on the forum are trying to learn it. going to add to this frequently and i will upload the project/source files so you can play with them.
    1) Hello World

    2) Input Output Strings


    3) Example usage of Define


    4) Looping with Labels


    5) Looping with do while

    6) Breaking a Do while Loop


    7) Simple Counting up (counts up to 10)
    Last edited by SonniE; 09-29-2008 at 03:17 AM.


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  2. #2
    Join Date
    Jun 2008
    Posts
    709
    Points
    351,099.48
    Rep Power
    196

    Default

    nice and simple. good guide sonnie

  3. #3
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    1,898,887.25
    Rep Power
    206

    Default

    added 4 more tuts im going to add more later


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  4. #4
    Join Date
    Jul 2009
    Posts
    41
    Points
    56,572.00
    Rep Power
    180

    Default

    Yeah thats true but it works..

    I used this to begin my first C++ a couple months back

  5. #5
    Join Date
    Oct 2009
    Posts
    120
    Points
    386,257.69
    Rep Power
    176

    Default Re: SonniE's C++ Tutorial

    Hey can you explain what the hell is going on please? lol =]

  6. #6
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    1,898,887.25
    Rep Power
    206

    Default Re: SonniE's C++ Tutorial

    Quote Originally Posted by TheEliteOne View Post
    Hey can you explain what the hell is going on please? lol =]
    do you have a specific question?


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  7. #7
    Join Date
    Oct 2009
    Posts
    120
    Points
    386,257.69
    Rep Power
    176

    Default Re: SonniE's C++ Tutorial

    Quote Originally Posted by SonniE View Post
    do you have a specific question?
    Okay, I've made a Hello World app for the PSP in C following a guide before I know one or two things

    /*
    SonniE's Hello World C++ Example 1
    This Program Shows basic console printing skills
    */
    #include <iostream>

    using namespace std;

    int main()
    {
    cout<<"Hello World";
    system("pause");
    }
    I know about // and /* */ for ignoring lines and stuff, it's this stuff that I get lossed at (This is very sad I know it =| )

    #include <iostream>

    using namespace std;

    int main()
    {
    cout<<"Hello World";
    system("pause");
    }
    Is { used to start a function and } used to end a function?

  8. #8
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    1,898,887.25
    Rep Power
    206

    Default Re: SonniE's C++ Tutorial

    the { } brackets enclose more than just methods (ex. main) they do everything from conditional if statements to loops.


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  9. #9
    Join Date
    Oct 2009
    Posts
    120
    Points
    386,257.69
    Rep Power
    176

    Default Re: SonniE's C++ Tutorial

    Lol

    /*
    SonniE's Hello World C++ Example 1
    This Program Shows basic console printing skills
    */
    #include <iostream>

    using namespace std;

    int main()
    {
    cout<<"Hello World";
    system("pause");
    }
    You should have used this: (Less sloppy)

    /*
    SonniE's Hello World C++ Example 1
    This Program Shows basic console printing skills
    */
    #include <iostream>

    using namespace std;

    int main()
    {
    cout<<"Hello World\n";
    system("pause");
    }
    Other wise it's like this:

    Last edited by TheEliteOne; 03-19-2010 at 12:32 AM.

  10. #10
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    1,898,887.25
    Rep Power
    206

    Default Re: SonniE's C++ Tutorial

    Quote Originally Posted by TheEliteOne View Post
    Lol



    You should have used this: (Less sloppy)



    Other wise it's like this:

    it doesn't need the linebreak the purpose of the code was to show the function that prints text. But if there was more to the program i would add a linebreak. You could use \n or the endl keyword.


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Posting Permissions

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