• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

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

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!
 
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.
 
Back
Top