Computer Science, asked by shubhamsj03, 6 months ago

manu driven program for static data member and friend function
pls help
it's a micro-project​

Answers

Answered by babitasingh6846
0

Explanation:

include <iostream> void foo(); class A { friend void foo(){ std::cout << a << std::endl; } static int a; }; int A::a = 10; int main(){ foo(); }

DEMO

The Standard states in the N4296::7.3.1.2/3 [namespace.memdef]:

Similar questions