Confusion about how having multiple files in folder works


#1

I’m new to atom and programming in general and I’ve started working on my first ‘big’ project, which is making a text adventure game using classes, to make reading the code less cumbersome I’ve got several files open within the same project folder.
I naively expected code in one file would be able to access a variable defined in a different file. So for example, in one file I invented an object class, and in a different file I tried to reference that class but it claimed to not know it existed.
Is there any way to allow it to access information within other files?
I suspect it might be something to do with file I/O but I’ve only ever used that with basic text documents so I’m at a bit of a loss of what to do.
Thanks in advance for any help!


#2

You also naively expect us to know exactly what language and packages you are using without naming any of them. It seems that in both cases, the difficulty is the same: you are expecting results without telling the code or us what you actually need to have happen.