C/C++
摘要: 如果到网上搜索VC中取得程序所在目录的函数, 大家都说是GetCurrentDirectory, 函数原型为DWORD GetCurrentDirectory(DWORD nBufferLength, LPTSTR lpBuffer); 使用简单, 直接将当前路径读到lpBuffer中, 方便快捷, 但是注意它是把当前路径读到lpBuffer中, 而未必是程序所在目录, 由于当前目录是可以通过SetCurrentDirectory修改的, 也会在弹出一个地址选择框后修改的, 所以不要寄希望于它了.阅读全文
摘要: #include <stdio.h>#include <malloc.h>#define N 10typedef struct node{char name[20];struct node *llink,*rlink;}stud;stud * creat(int n){stud *p,*h,*s;int i;if((h=(stud *)malloc(sizeof(stud)...阅读全文