Hello!

I need to convert the following Java code to C++ and have trouble figuring out how to represent Java Long in C++.

Here's the Java code:

String function(Number n){
long l = n.longValue();
return Long.toString(l, 16);
}

This is what I'm thinking of doing in C++
string function(long l){
stringstream ss;
ss << l;
return ss.str();
}

Would that work?
In C++, there are different types of longs...
http://home.att.net/~jackklein/c/inttypes.html#long

Is long returned by n.longValue() the same as long (signed) in C++?