New Game
1
Name:
Anonymous
2007-12-06 2:45
Hello I just started my first game. I need your help deciding what to add to it next. When done I want it to be like WoW only with graphics like Crysis. Here is the code I have done so far.
#include <iostream>
using namespace std;
class Hero
{
public:
int Health;
int Attack;
};
Hero & CreateHero();
int main()
{
Hero *ThisHero = new Hero;
*ThisHero = CreateHero();
Hero *NewHero = ThisHero;
ThisHero->Health = 5;
NewHero->Attack = 10;
cout << ThisHero->Health;
cout << "\n" << ThisHero->Attack;
cin.get();
ThisHero = NULL;
delete ThisHero;
}
Hero & CreateHero()
{
Hero *MyHero = new Hero;
return *MyHero;
}
2
Name:
Anonymous
2007-12-06 3:08
3
Name:
Anonymous
2007-12-06 3:46
4
Name:
Anonymous
2007-12-06 3:49
>>3
>>1 is gonna be making the best game ever, look, he even shared code! Bow down to our new overlord!
5
Name:
Anonymous
2007-12-06 3:51
>>1
Fixed it for you:
#include <iostream>
using namespace std;
class GuitarHero
{
public:
int Health;
int Attack;
};
GuitarHero & CreateGuitarHero();
int main()
{
GuitarHero *ThisGuitarHero = new GuitarHero;
*ThisGuitarHero = CreateGuitarHero();
GuitarHero *NewGuitarHero = ThisGuitarHero;
ThisGuitarHero->Health = 5;
NewGuitarHero->Attack = 10;
cout << ThisGuitarHero->Health;
cout << "\n" << ThisGuitarHero->Attack;
cin.get();
ThisGuitarHero = NULL;
delete ThisGuitarHero;
}
GuitarHero & CreateGuitarHero()
{
GuitarHero *MyGuitarHero = new GuitarHero;
return *MyGuitarHero;
}
6
Name:
Anonymous
2007-12-06 3:52
>>1 fails at simple C++ code.
7
Name:
Anonymous
2007-12-06 3:52
8
Name:
Anonymous
2007-12-06 5:36
>>7
Are you aware that the post range ``
>>4-7 '' included your own post? Was this the intent?
9
Name:
Anonymous
2007-12-06 5:46
10
Name:
Anonymous
2007-12-06 5:49
11
Name:
Anonymous
2007-12-06 5:57
12
Name:
8
2007-12-06 6:00
>>10
What, don't clump me in with your own fail.
13
Name:
Anonymous
2007-12-06 6:00
this is the worst thread on /prog/
14
Name:
Anonymous
2007-12-06 6:11
ever
15
Name:
Anonymous
2007-12-06 6:23
16
Name:
Anonymous
2007-12-06 6:31
17
Name:
sage
2007-12-06 6:51
18
Name:
Anonymous
2007-12-06 7:08
>>21
I doubt that you could write a program that does that, but go ahead and prove me wrong.
19
Name:
Anonymous
2007-12-06 8:04
I give it 6/10. The trolling is subtle at some of the lines.
20
Name:
Anonymous
2007-12-06 10:43
21
Name:
Anonymous
2007-12-06 10:46
22
Name:
Anonymous
2007-12-06 10:48
AnHero();
23
Name:
Anonymous
2007-12-06 16:15
24
Name:
Anonymous
2007-12-06 16:15
25
Name:
Anonymous
2007-12-06 16:58
>>1
Obvious troll is obvious. But make me laugh and keep trolling, OP
26
Name:
Anonymous
2007-12-06 17:23
27
Name:
Anonymous
2007-12-06 17:24
28
Name:
Anonymous
2007-12-06 17:31
>>29
This statement is false
29
Name:
Anonymous
2007-12-06 17:32
>>28
This statement is true
30
Name:
Anonymous
2007-12-06 17:48
>>30
This statement thinks, therefore it is.
31
Name:
Anonymous
2007-12-06 20:48
The below statement is true
32
Name:
Anonymous
2007-12-06 20:50
The above statement is false
33
Name:
Anonymous
2007-12-06 21:58
The above statement is false.
Crisis averted.
34
Name:
Anonymous
2007-12-06 22:45
35
Name:
Anonymous
2007-12-07 4:36
36
Name:
Anonymous
2007-12-07 7:26
37
Name:
Anonymous
2007-12-07 7:32
38
Name:
Anonymous
2007-12-07 9:04
>>50
Are you a a faggot by chance?
39
Name:
Anonymous
2007-12-07 9:23
40
Name:
Anonymous
2007-12-07 10:09
Newer Posts