F&A Diskussionen
std::string
1 Stimme
3 AntwortenConvering char to std::string
3 Stimmen
7 Antwortenchar* vs std::string
0 Stimmen
1 Antwort#include <iostream>
#include <bitset>
int main()
{
int myDecimalNumber;
std::cin >> myDecimalNumber;
std::string binary = std::bitset<8>(myDecimalNumber).to_string(); //to binary
std::cout<<binary<<"\n";
unsigned long decimal = std::bitset<8>(binary).to_long();
std::cout<<decimal<<"\n";
return 0;
}
2 Stimmen
5 AntwortenHeute heiß
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Please rate my code from 1 to 10
2 Votes
How to start
0 Votes