mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
13 lines
217 B
C++
13 lines
217 B
C++
|
#include <stdio.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int main(int argc, char* argv[])
|
||
|
{
|
||
|
const size_t WDSIZE = 4096;
|
||
|
char wd[WDSIZE];
|
||
|
if ( !getcwd(wd, WDSIZE) ) { perror("getcwd"); return 1; }
|
||
|
printf("%s\n", wd);
|
||
|
return 0;
|
||
|
}
|
||
|
|