C++ (again). Determine full path for an argument via CLI

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

C++ (again). Determine full path for an argument via CLI

Post by Chris Corbyn »

Basically the little app I'm writing will be finished (I think) once I've figured this out. You pass it an filename (and some options if you desire) via command line. It then scans the file for tokens defined in yet another file and builds a stack.

The problem I'm having right now is that I need to either pass a filename/path that's relative to the loocation of the executable or an absolute path. How do apps allow you to pass a filename that's relative to $PWD for the user themself?

EDIT | Scrap that, getcwd() seems to help :)
Post Reply