#I want to create a size of array using the private section but gives me error say

4 messages · Page 1 of 1 (latest)

calm falcon
#

D:\Code Blocks\Project2\demo.cpp|46|error: 'int MyArray::arr [100]' is private within this context|

This my class code

north daggerBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.

old plume
#

Your other code tries to use this classes’s private member, only this class’s member functions can access its privates

north daggerBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.