0
Why when comment part is accessible the compilator doesn't out them.
#include <iostream> using namespace std; class myclass { public: void funcHi() { cout << "hi" << endl; }; int funcclear; string funcright; string funcstring() { cout << "it is func right" << endl; } }; int main() { myclass test; /* test.funcHi(); test.funcstring();*/ test.funcclear = 15; test.funcright = "Right"; cout << test.funcclear << endl; cout << test.funcright << endl; return 0; }
1 Odpowiedź
+ 3
Whatever is inside comments /**/ won't get compiled. They are meant to be used as comments to orient someone else who might look at your code, as you probably didn't know you can comment pieces of code to test it. Hope I answered ur question bro