Re: SonniE's C++ Tutorial
Hey can you explain what the hell is going on please? lol =]
Re: SonniE's C++ Tutorial
Quote:
Originally Posted by
TheEliteOne
Hey can you explain what the hell is going on please? lol =]
do you have a specific question?
Re: SonniE's C++ Tutorial
Quote:
Originally Posted by
SonniE
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
Quote:
/*
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 =| )
Quote:
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World";
system("pause");
}
Is { used to start a function and } used to end a function?
Re: SonniE's C++ Tutorial
the { } brackets enclose more than just methods (ex. main) they do everything from conditional if statements to loops.
Re: SonniE's C++ Tutorial
Lol
Quote:
/*
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)
Quote:
/*
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:
http://img534.imageshack.us/img534/4886/13975297.png
Re: SonniE's C++ Tutorial
Quote:
Originally Posted by
TheEliteOne
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.