|
-
November 12th, 2009, 10:57 AM
#1
What is C++ equipvalent of Java Long?
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++?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|