F&A Diskussionen
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 Stimmen
3 AntwortenHeute heiß
Need a personal tutor
1 Votes
Fix code
0 Votes
..
1 Votes
Software to write and run codes
1 Votes
Add lua
0 Votes
Summary please??
0 Votes