我需要获取最近在c
中创建的文件的文件路径<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("maps", "3",{other_params:"sensor=false"});
</script>
<div id="map-canvas"></div>
<select id="type" onchange="filterMarkers(this.value);">
<option value="">BEST FOR (SHOW ALL)</option>
<option value="BABIES">BEST FOR BABIES</option>
<option value="TODDLERS">BEST FOR TODDLERS</option>
<option value="KIDS">BEST FOR KIDS</option>
<option value="ALL">BEST FOR ALL</option>
</select>
<br>
<select id="type" onchange="filterMarkersBS(this.value);">
<option value="">BABY SWINGS (SHOW ALL)</option>
<option value="BSYES">HAS BABY SWINGS</option>
<option value="BSNO">DOES NOT HAVE BABY SWINGS</option>
</select>
现在如何获取client.txt的文件路径?
答案 0 :(得分:1)
您需要当前的工作目录。 getcwd会为你做这件事。
这应该有效
#include <unistd.h>
#include <linux/limits.h>
char path[MAX_PATH + 1];
char *cwd = getcwd(path, MAX_PATH);