Do you have any idea on how to use stoull
on Visual Studio 2008? I want to convert string to unsigned long long. Thanks!
Asked
Active
Viewed 302 times
0

Christian Mark Ramos Godoy
- 31
- 1
- 3
- 7
-
I don't think VS2008 has any C++11. – chris Jul 24 '13 at 00:15
-
http://msdn.microsoft.com/en-us/library/ee404774.aspx - if you click on "other versions", it shows that it isn't available before 2010. Try using `stringstream` instead? – Mats Petersson Jul 24 '13 at 00:16
-
@chris Is there any way I can implement `stoull` or any other method that I can use to achieve unsigned long long? – Christian Mark Ramos Godoy Jul 24 '13 at 00:17
-
@Mats Petersson OK! I'll try that up! Thanks! – Christian Mark Ramos Godoy Jul 24 '13 at 00:17
-
@ChristianMarkRamosGodoy, `long long` wasn't a standard type before C++11, so I'm not completely sure. – chris Jul 24 '13 at 00:18
-
@ChristianMarkRamosGodoy As was pointed out to you by [an answer](http://stackoverflow.com/a/17814627/583833) in your other question, you can use stringstreams for this. – Borgleader Jul 24 '13 at 00:25
-
In VC2008 and earier, you can use a (non-standard) `_strtoui64`; [see documentation](http://msdn.microsoft.com/en-us/library/85zk715d.aspx). `__int64` is the same type as `long long` with these compilers. – Igor Tandetnik Jul 24 '13 at 04:32
1 Answers
0
For stoll/stoull replacement please look here: http://msdn.microsoft.com/en-us/library/czcad93k%28v=vs.90%29.aspx
you can make use of : _atoi64, _atoi64_l, _wtoi64, _wtoi64_l which converts a string to a 64-bit integer.
hope this helps!! Happy coding, -codevik

codevik
- 1
- 1