Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
How to access member function of a class using scope
//g++ 5.4.0 #include <iostream> using namespace std; class sq{ public: int a=6; int func(); }; int sq::func(){ return a*a; } int main() { class sq s; cout << "6 by 6 ="<<s.func(); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
A • Potato Sacks
Kadane's Algorithm
მატრიცა#2
integer division
Hi
Ptrtest
finding factor
deux
Building squares using smallest amount of matches
Średnia bez zera
Please log in to post a comment.