Untitled
unknown
plain_text
2 years ago
249 B
5
Indexable
#include <iostream>
#ifdef _WIN32
#include <direct.h>
#else
#include "unistd.h"
#endif
int main()
{
#ifdef _WIN32
char* res = _getcwd(NULL, 0);
#else
char* res = getcwd(NULL, 0);
#endif
std::cout << res << '\n';
free(res);
}Editor is loading...