Обсуждения
can 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 голосов
3 ответовАктуальное сегодня
Seeking knowledge
1 Votes
What about... "Brainfuck"?
0 Votes
<nav>
0 Votes
Javascript
0 Votes
No Numerals Code Coach
1 Votes
html,java,css
0 Votes
Help in mini project
0 Votes