Q&A Discussions
Void and Main
0 Votes
4 AnswersPrint() or return()?
1 Vote
2 Answers#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 Votes
5 AnswersDef не печатается без принт
0 Votes
1 AnswerWhat is wrong here plis help
-1 Vote
1 Answerwhy this code is not working
0 Votes
1 AnswerFunctions in programming
1 Vote
1 AnswerРазжуйте модуль "методы"
0 Votes
3 AnswersC#Love Chat-6
4 Votes
6 Answerscan someone please explain why this code keeps telling me complication error instead of outputting the value of speed.
#include <iostream>
using namespace std;
class myClass {
public:
void setcarspeed (int a){
speed=a;
}
int getcarspeed(){
return speed;
}
private:
int speed;
};
int main() {
myClass obj;
obj.setcarspeed (40);
cout<<obj.getcarspeed ;
return 0;
}
2 Votes
3 AnswersHot today
Someone can help me
2 Votes
X velocity
0 Votes
Files not linking in C++
0 Votes
I am a super beginner
0 Votes
Web Dev
0 Votes
Pls give me an idea
1 Votes
How this program executes?
0 Votes