Bill Tubbs

Greenhorn
+ Follow
since Sep 22, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bill Tubbs

Thanks Bear Bibeault.

I think I've found the problem. I was using the wrong class method [fileURL absoluteString].

I should be using path. "Returns the path of a URL conforming to RFC 1808."

See http://stackoverflow.com/questions/3057086/how-to-chop-off-file-from-nsurl

Sorry to those who are not familiar with ObjectiveC.

Thanks!
11 years ago

I don't know. I didn't add it. That's what NSOpenPanel returned:




Thanks.
11 years ago
This is helpful thanks. I am also trying to read a file from a Mac OS X filesystem using C++.

I get the user to select the file location using the NSOpenPanel method and convert the URL to a const char inputFilename which looks something like this:

file://localhost/Users/.../DataFile.txt

But when I try to open the file with



inFile.is_open() returns an error.

Do I need to manipulate this path before using it in ifstream?
11 years ago