|
[原创]给师弟做了刘涛涛题目
我这不可以用sum,有个库里面有sum, 刚才我没测试,用了if(*str>='0' && *str<='9')判断,并把数字后跳得过程后移则没有"--"的问题了 哈哈,我学会贴代码了,谢........... int mysum(const char *str) { int s=0; do { if(*str>='0' && *str<='9') { // 如果是数字则试图计算 printf("sum = %6d\tcurrent string: %s\n",s,str); s+=atoi(str); while(*str>='0' && *str<='9')++str; // 该数字串已计算,跳过数字 } }while(*str++); return s; } |
|
[原创]给师弟做了刘涛涛题目
问一下,怎么贴代码的哈;) |
|
[原创]给师弟做了刘涛涛题目
感觉dwing的程序如果自己实现atoi,并且加上判断的话就比较完美了 |
|
[原创]给师弟做了刘涛涛题目
dwing的思路和我一样,都是截断字符串计算,但是实现看起来清爽很多:) 问题: 1。实现时有错误,看了下atoi的实现,如果输入字符中有两个--相连的时候,atoi会跳过该数字,如 "aker--9=10"只会计算10 2。另外感觉dwing每次调用atoi还是有些不好,稍微改了下,主要是加了个判断,这样就会少调用很多次atoi了。 int sum(const char *str) { int s=0; do { if(*str>='0' && *str<='9') { // 如果是数字则试图计算 s+=atoi(str); do ++str; while(*str>='0' && *str<='9'); // 该数字串已计算,跳过数字 } }while(*str++); return s; } 但是"--"的问题还存在,需要修改判断条件 感觉我的那个老实的程序没错;) |
|
[原创]给师弟做了刘涛涛题目
感觉只要知道一些字符编码知识,逻辑没有问题,就很块可以做出来,这应该是简单题:P,我花了10分钟不到,还是因为修改格式的 问我的兄弟主要是没有把那个数字串连起来的整体考虑,然后写了n多代码.......... |
|
翻译:通往WinDbg的捷径(一)
这个有后续吗 |
|
[推荐]MSDN 精简版
作者修改了连接,需要进页面下载 |
|
[原创]编程禁止Windows文件保护
#include <windows.h> #pragma comment(lib,"user32") typedef DWORD WINAPI SfcFileException(DWORD dwUnknown0, PWCHAR pwszFile, DWORD dwUnknown1); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pszCmdLine, int cmdShow) { DWORD result = 0; WCHAR szW[100] = L"C:\\Windows\\Explorer.exe"; HMODULE hLib = LoadLibrary("SFC_OS.DLL"); SfcFileException *se = GetProcAddress(hLib,5); result = se(0,szW,-1); if (result) MessageBox(NULL,"err","err",MB_OK); else MessageBox(NULL,"success","success",MB_OK); FreeLibrary(hLib); return 1; } xp sp2中这个可以 |
|
|
|
[原创]编程禁止Windows文件保护
为什么我这样定义函数指针出错? typedef DWORD WINAPI (*PSfcFileException)(DWORD dwUnknown0, PWCHAR pwszFile, DWORD dwUnknown1); 。。。 PSfcFileException se = ... |
|
[原创]编程禁止Windows文件保护
这个改c怎么改? 我改的这个好像UNICODE有问题,我太搞得清楚,那位大虾看看 #include <windows.h> #pragma comment(lib,"user32") typedef DWORD WINAPI SfcFileException(DWORD dwUnknown0, PWCHAR pwszFile, DWORD dwUnknown1); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pszCmdLine, int cmdShow) { DWORD result = 0; HMODULE hLib = LoadLibrary("SFC_OS.DLL"); SfcFileException *se = GetProcAddress(hLib,5); result = se(0,L"C:\\Windows\\Explorer.exe",-1); if (result) MessageBox(NULL,"err","err",MB_OK); else MessageBox(NULL,"success","success",MB_OK); FreeLibrary(hLib); return 1; } |
|
|
|
[收藏]绝无仅有!仅7K大小的EXE文件加密保护程序
[QUOTE=破浪;262774]一个界面友好的免费软件,用于给EXE文件加密保护,该软件使用的是RC4加密。 [/QUOTE] cant access regestry |
|
[推荐]MSDN 精简版
夜里很快,110k左右,白天需要多线程下才好,每个线程大概6k;) |
|
|
|
|
|
两个变量交换,不使用第三个变量如何实现?
[QUOTE=peaceclub;312371]既然这样了,为什么不如此操作? asm mov eax,A mov edx,B mov A,edx mov B,eax end; 如果是A,B是独立数的话,也可以: A=A+B B=A-B A=A-B[/QUOTE] 楼主的意思应该是这个, A=A+B B=A-B A=A-B -------- 你们这样把人家都弄糊涂了,呵呵呵呵 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值