-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstrtonum.cpp
More file actions
16 lines (12 loc) · 444 Bytes
/
Copy pathstrtonum.cpp
File metadata and controls
16 lines (12 loc) · 444 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
int main(int argc, char* argv[]) {
std::string vid = "6457479851916881770";
std::string uid = "1304391530";
std::cout << vid << "->" << strtoull(vid.c_str(), NULL, 10) << std::endl;
std::cout << uid << "->" << strtoul(uid.c_str(), NULL, 10) << std::endl;
std::cout << uid << "->" << strtoul(uid.c_str(), NULL, 2) << std::endl;
return 0;
}