🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #308572

Re: Jak znaleźć katalog użytkownika pod Windows?

#308572
From: Wiktor S.
Date: Thu, 19 May 2016 20:35
15 lines
1155 bytes
> Ale chcę napisać program działający tu i tu.


string homedir;

#ifdef UNIX
  homedir = getenv("USERPROFILE");
#else
  struct passwd *pw = getpwuid(getuid());
  homedir = pw->pw_dir;
#endif


-- 
Wiktor S.
Technical Details
Message-ID: <nhl826$2ss$1@usenet.news.interia.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.interia.pl!not-for-mail
References: <nhhg1r$t4i$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.interia.pl!not-for-mail
From: "Wiktor S." <wswiktorSP@Mpoczta.fm>
Newsgroups: pl.comp.lang.c
Subject: Re: Jak znaleźć katalog
 użytkownika pod Windows?
Date: Thu, 19 May 2016 22:35:19 +0200
Organization: INTERIA.PL S.A.
Lines: 16
Message-ID: <nhl826$2ss$1@usenet.news.interia.pl>
References: <nhhg1r$t4i$1@node2.news.atman.pl>
NNTP-Posting-Host: user-109-243-236-184.play-internet.pl
Mime-Version: 1.0
X-Trace: usenet.news.interia.pl 1463690118 2972 109.243.236.184 (19 May 2016 20:35:18 GMT)
X-Complaints-To: usenet@firma.interia.pl
NNTP-Posting-Date: Thu, 19 May 2016 20:35:18 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit