how would this lil java statement convert to c++?

Thyme

Platinum Member
Nov 30, 2000
2,330
0
0
What is it trying to do? Do you just want to know how to do console output in C++?
 

beramodk

Member
Feb 4, 2006
28
0
0
I have a couple java sources to convert, but I don't know any java, so I was wondering how to convert a tiny segment of java code into c++ so I can see how different it is.
would the above code be something like this?

int main()
{
In stdin = new In();
Game game = new game(stdin);
cout << "game" << endl;
game.play()
}

btw if anyone has some free time, can you help me on some java to c++ conversion? 5 files not very long.
thanks!
 

Cerebus451

Golden Member
Nov 30, 2000
1,425
0
76
The code assumes that the '<<' operator has been overriden in the Game class. Otherwise the process of creating objects and calling methods in C++ is very similary to Java.