lrotermund / learning_c

just some c scripts
0 stars 0 forks source link

Try to use getcwd for dynamic importing :) #1

Open bdbch opened 1 month ago

bdbch commented 1 month ago

I'm not that deep into C but thought it would be nice to try around with some built-ins:

https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-getcwd-get-path-name-working-directory

this seems to be a function that you could use to not point to your full file path here:

https://github.com/lrotermund/learning_c/blob/8b7dfeb9b5d8df354730d774f5ae095d88779bd7/01/06_file.c#L10

lrotermund commented 1 month ago

Hey @bdbch. Haha, true. I was too lazy to look for another solution. It's just the first baby steps in the C programming book. Probably there will be similar ways presented 😊 Thanks for the issue, in my little learning repo I wasn't expecting any interactions 😄

bdbch commented 1 month ago

Sure thing. Just saw it on my home page and thought I'd check it out 😂