Search
 
SCRIPT & CODE EXAMPLE
 

CPP

get current directory cpp

#include <iostream>
#include <string>
#include <filesystem>
#include <unistd.h>

using std::cout; using std::cin;
using std::endl; using std::string;
using std::filesystem::current_path;

int main() {
    char tmp[256];
    getcwd(tmp, 256);
    cout << "Current working directory: " << tmp << endl;

    return EXIT_SUCCESS;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ is string a number 
Cpp :: vhdl integer to std_logic_vector 
Cpp :: how to check string contains char in c++ 
Cpp :: how to use winmain function 
Cpp :: int_min in cpp 
Cpp :: clear file before writing c++ 
Cpp :: leap year c++ 
Cpp :: C++ system text format 
Cpp :: how to make sure the user inputs a int and not anything else c++ 
Cpp :: how to shut down windows in c++ 
Cpp :: how to make string get spaces c++ 
Cpp :: repeat character n times c++ 
Cpp :: controlling in windows 
Cpp :: c++ how to generate a random number in a range 
Cpp :: retourner pointeur de type qstringlist qt 
Cpp :: c++ save typeid 
Cpp :: change int to string cpp 
Cpp :: how to specify how many decimal to print out with std::cout 
Cpp :: what is time complexity of min_element() 
Cpp :: shout sharkest 
Cpp :: c ++ program to search hashmap 
Cpp :: user defined key for map in c++ 
Cpp :: equal_range in C++ 
Cpp :: c++ print to standard error 
Cpp :: how to change string to lowercase and uperCase in c++ 
Cpp :: c++ matrix as argument 
Cpp :: online cpp to exe converter 
Cpp :: check if float has decimals c++ 
Cpp :: how to string to integer in c++ 
Cpp :: array and for loop in c++ 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =