A contract cannot access another contract's storage directly.
Given contracts C1 and C2, C1 can only access the storage of C2 by invoking a method on C2 that returns data from C2's storage.
Since you are writing C2, you can access its storage from C1 and can make progress. A more specific question may help provide a more specific answer about designing your contracts (structs, flattening, copies...).
Related, there are 3 things that a contract can access from another contract: balance, code, code size.
The underlying mechanisms for doing so are the following EVM opcodes, from the Yellow Paper:
BALANCE: Get balance of the given account
EXTCODECOPY: Copy an account’s code to memory.
EXTCODESIZE: Get size of an account’s code.
Per Paul's comment, address.balance works in Solidity.
contract A{struct egStruct{uint number;bool value;//....}mapping (uint => egStruct) structMapping;//...code...}`contract b is A {//...code}In this case also, is it not possible to access a mapping (which is not public). Actually my specific question would be, If in this case I want to access the struct trough mapping of contract A from contract b of, then can I do it? (I tried and I am getting blank values for all)
– 11t Mar 28 '17 at 22:03Aand you might be able to call it inblikesuper.nameOfAccessor(). This would be different frombaccessing the storage ofAdirectly. – eth Mar 31 '17 at 08:38mappingvariable of another contract right? – alper Jan 20 '24 at 14:32