| View previous topic :: View next topic |
| Author |
Message |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Thu Jan 26, 2012 1:48 pm Post subject: site 4 learning c++ |
|
|
| any recommendations 4 some book or some site? (i wana learn c++ 4 making games)
|
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Thu Jan 26, 2012 1:51 pm Post subject: |
|
|
| google
|
|
| Back to top |
|
 |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Thu Jan 26, 2012 2:04 pm Post subject: |
|
|
| i mean best site... (making games)
|
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Thu Jan 26, 2012 2:13 pm Post subject: |
|
|
| google
|
|
| Back to top |
|
 |
C-Dizzle Grandmaster Cheater
Reputation: 89
Joined: 16 Mar 2008 Posts: 623
|
|
| Back to top |
|
 |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Thu Jan 26, 2012 2:22 pm Post subject: |
|
|
thanks... witch one is better?
|
|
| Back to top |
|
 |
C-Dizzle Grandmaster Cheater
Reputation: 89
Joined: 16 Mar 2008 Posts: 623
|
Posted: Thu Jan 26, 2012 2:57 pm Post subject: |
|
|
| They are both pretty good. The first one I recommend going through first. the second one has little things to do at the end of each section to test yourself. So I suggest you use them both along side each other.
|
|
| Back to top |
|
 |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Thu Jan 26, 2012 3:16 pm Post subject: |
|
|
| i know from before stuff like if, void etc... just i forgot it..
|
|
| Back to top |
|
 |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Thu Jan 26, 2012 3:30 pm Post subject: |
|
|
.... how would you make console program that shows just if you enter corect password
e.g | Code: | #include <iostream>
using namespace std;
int main()
{
int x,y,z, ;
cout <<"Enter password : \n\n";
cin >> x;
if(x = blahblahblah)
{
cout <<"12345";
{
system("PAUSE");
return 0;
}
|
something like this but this doesnt work..
|
|
| Back to top |
|
 |
C-Dizzle Grandmaster Cheater
Reputation: 89
Joined: 16 Mar 2008 Posts: 623
|
Posted: Thu Jan 26, 2012 4:38 pm Post subject: |
|
|
| Code: | #include <iostream>
#include <string>
using namespace std;
int main()
{
int y,z, ;
string x;
cout <<"Enter password : \n\n";
cin >> x;
if(x == "blahblahblah")
{
cout <<"12345";
{
system("PAUSE");
return 0;
}
|
Really not sure if that will work, I can't compile ATM. Again, not sure if correct in the slightest.
|
|
| Back to top |
|
 |
1929394839292057839194958 Grandmaster Cheater Supreme
Reputation: 130
Joined: 22 Dec 2006 Posts: 1509
|
Posted: Thu Jan 26, 2012 4:47 pm Post subject: |
|
|
| It doesn't work because you tried using a fucking opening parenthesis curly bracket to close your if statement.
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Thu Jan 26, 2012 4:50 pm Post subject: |
|
|
| Arktri, std::endl please. Exposing whole namespaces is alright in small programs, but in a big project it can be a BITCH.
|
|
| Back to top |
|
 |
C-Dizzle Grandmaster Cheater
Reputation: 89
Joined: 16 Mar 2008 Posts: 623
|
Posted: Thu Jan 26, 2012 5:29 pm Post subject: |
|
|
| Noz3001 wrote: | | Arktri, std::endl please. Exposing whole namespaces is alright in small programs, but in a big project it can be a BITCH. |
Use it outside or inside int main()? <Sorry, I'm still pretty retarded when it comes to C++>
| konr wrote: | | It doesn't work because you tried using a fucking opening parenthesis curly bracket to close your if statement. |
I actually feel retarded for not noticing this. I mean I literally facepalmed.
|
|
| Back to top |
|
 |
paupav Master Cheater
Reputation: 13
Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
|
Posted: Fri Jan 27, 2012 11:58 am Post subject: |
|
|
| Arktri wrote: | | Code: | #include <iostream>
#include <string>
using namespace std;
int main()
{
int y,z, ;
string x;
cout <<"Enter password : \n\n";
cin >> x;
if(x == "blahblahblah")
{
cout <<"12345";
{
system("PAUSE");
return 0;
}
|
Really not sure if that will work, I can't compile ATM. Again, not sure if correct in the slightest. |
thanks... you just had few mistakes...
| Code: |
#include <iostream>
#include <string>
using namespace std;
int main()
{
string x;
cout <<"Enter password : \n\n";
cin >> x;
if(x == "blahblahblah")
{
cout <<"12345";
}
system("PAUSE");
return 0;
}
|
Last edited by paupav on Fri Jan 27, 2012 2:13 pm; edited 1 time in total |
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Fri Jan 27, 2012 1:00 pm Post subject: |
|
|
| ^ Don't forget the comma after z. And the fact that they are un-used variables
|
|
| Back to top |
|
 |
|