Q&A Discussions
Program Language
1 Vote
3 AnswersWord counter
0 Votes
1 Answerhtml and css
0 Votes
1 Answercan 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 Answersnew horizons
2 Votes
2 AnswersIn the short code below, I declared an array of five elements. But I'm getting confused on how to use it in a while loop. My main question is , if the user inputs a userchoice1 value that is less than 1, I want the code to keep looping until the user inputs a number that is not less than 1. But I don't know if the 7th line (userchoice1 [x]++) shows the right way to loop it.
1 Vote
2 AnswersCentering Issues
1 Vote
2 AnswersHey you ! Yes , you!
0 Votes
3 AnswersChallenge 😀
1 Vote
2 AnswersPlease suggest me
-2 Votes
2 AnswersFatal error
0 Votes
1 AnswerHot today
SQL
3 Votes
HTML/CSS questions
0 Votes
IMAGE
0 Votes
Html
1 Votes
How to learn css and html
0 Votes
Certificate Problem
0 Votes
Find courses
0 Votes