

I am not meaning to rag on anything you've written up, as trying to transpile between these two languages is a rather large undertaking in and of itself since the languages are radically different in a lot of ways, and what you have is a good starting point. However, it does not realize that the Hashtable can be translated to a std::unordered_map (or I guess a std::map although unordered_map is an actual hash table whereas std::map is not), and attempts to just return a pointer to some undefined type (or attempts to - see the above sentence where it tries to return an object as a pointer).Īs many others have said as well, there are a lot of pointers that are being allocated without being cleaned up - perhaps it should return unique_ptr by default (or shared_ptr if you're looking for a quick and dirty solution). So it appears that the transpiler knows that the ArrayList is basically a vector and translates that okay-ish (although it tries to return an object as a pointer in the GetList function, which causes a compiler error).

I ran this code segment: import java.util.* I understand this is your first run at this, and it's a pretty interesting concept (although I don't really see where personally I'd use this).
