Reading from files (mac)


#1

I’m a beginner user and i want to ask you if is there a way to read from a txt file


#2

Is this a question about Atom or Electron?


#3

Ah Right. Atom


#4

Atom opens files just like any other text editor. What seems to be the problem?


#5

i want write a c++ program and create a stream to read a txt file


#6

Okay, that’s a very different thing and you should have mentioned that you wanted to execute code. Atom does not have any ability to execute code that isn’t JavaScript, so you have to download a package such as script or atom-runner.


#7

i’ve installed gpp compiler


#8

That’s something else you should have mentioned. What seems to be the difficulty with using it?


#9

well, I would like to read from the file in the code, usually on Windows I use the fstream library and there aren’t problems, but on a Mac if I use the same method nothing happens


#10

This is less of an Atom question and more of a C++ question, and you might find more information looking in C++ or Mac forums.


#11

ah ok thanks