adding directories and data to empty c++ project

Erri 21 Reputation points
2022-05-24T23:41:52.377+00:00

Hi I have a c++ project and I want to add directories and files to the directory the .exe file will be in when debugging basically I want to add the directory data and the file time.db to the directory data in the directory the exe file will be in so when it's run it will have the resources available? how does this work with visual basics? If I use fopen("data/time.db", "w") should i put the files in a certain directory? because data directory wont be there and I think it will give me an error. Like should I add a filter and if so where should it be added in the sources filter or in its own filter and how should I access it with fopen. Thanks for your patience. Also I used c++ filter cause that's the only one for c programming and this program is in c.

Lastly if there is a different way then using the fopen statement that visual basic programmers use I'm ears. I am very new to visual basics and also I am not a student I am just a hobbyist.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
{count} votes

Accepted answer
  1. RLWA32 40,286 Reputation points
    2022-05-25T02:11:02.797+00:00

    By default when debugging a C++ project the visual studio debugger will set the working directory for the program being debugged to the folder that contains your project file (.vcxproj).

    0 comments No comments

0 additional answers

Sort by: Most helpful