- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 5
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
Re: ; hi. ; it will jump if eax is greater. ; "jg" is the opposite | |
Re: first you should set the internal pull up resistors for the pins you're attaching the buttons to: [CODE] PORTB = 0b11100000; [/CODE] then you can check if button1 is pressed: [CODE] #define button1_pressed !(PINB & 0b10000000) if (button1_pressed) { //do something } [/CODE] for button2 and 3: [CODE] #define button2_pressed … | |
Re: [url]http://projecteuler.net/index.php?section=problems[/url] they are kinda tough though :) | |
Re: [CODE] .data? x dd ? y dd ? z dd ? w dd ? .code start: mov eax, x mul y div z add eax, 14 mov w, eax end start [/CODE] | |
hey guys, i need to pass 'this' as the template function parameter.. any help will be appreciated. | |
Re: if you divide the number by 10, then the remainder will be the last digit from your number. so you can make a loop (till the number becomes 0), in which you will get the last digit using the method above, and then to remove the last digit from the … | |
Re: store an integer (number of times opened) somewhere, for example in the registry and at every program startup check if that stored value is less than the total number of times the program is allowed to run. if the value is less, then increment it and run the program, or … | |
Re: for me it works fine, but u have to replace '>' by '>=' in all the while loops so like if u have the change = 100, it will increase hundreds by one.. | |
Re: you should include <string> | |
Re: you are inputting the column into a char, and then using it to address the seat! thats wrong.. so u should compare the column input with 'a', 'b', 'c', and 'd'.. if its 'a' then column = 0; if its 'b' then column = 1; // and so on.. [CODE] … | |
Hey everyone! I'm writing some program and im using a vector tp hold pointers to objects.. i will create new instances of the objects and my code should automatically destroy each object present in the vector. theres three types of classes stored in the vector : BaseClass, ChildClass1(inherited from BaseClass) … | |
Re: if i understood you correct then this is the code: [CODE] int x = 300; char out[4]; memcpy(out, &x, sizeof(int)); [/CODE] and then if you want to check if 'out' has the correct data you can do the following check: [CODE] printf("%d\n", MAKELONG(MAKEWORD(out[0], out[1]), MAKEWORD(out[2], out[3]))); [/CODE] | |
Re: hey, you can play mp3 files in your program like this: [CODE] HWND m_Video = MCIWndCreate(hWnd, GetModuleHandle(NULL), WS_CHILD | WS_VISIBLE | MCIWNDF_NOPLAYBAR | MCIWNDF_NOMENU, _T("C:\\123.mp3")); MCIWndPlay(m_Video); [/CODE] and then you should destroy the handle by using MCIWndDestroy: [CODE] MCIWndDestroy(m_Video); [/CODE] | |
hey, im making a database program using standard c functions (fopen, fclose...) and i need to read and write data to files quite frequently, so is it better to open (fopen) and close (fclose) the files before and after each operation or open the files at the beginning of the … | |
Re: no its not safe it can be any value.. its better to initialize mem_ptr to 0 in the constructor of your class. | |
Re: you can check out this site [URL="http://www.novaroma.org/via_romana/numbers.html"]http://www.novaroma.org/via_romana/numbers.html[/URL] there is a converter on the right it lets you convert between roman and numbers. ypu can view the source of the page and get the algorithm. | |
this code was written by me for my projects. all it does is increments by 1 the string which is passed to the function. if you have any improvements to my code ill be glad to hear from you ;) | |
Re: ; use windows sockets [URL="http://msdn.microsoft.com/en-us/library/ms741394(VS.85).aspx"]http://msdn.microsoft.com/en-us/library/ms741394(VS.85).aspx[/URL] | |
Re: ; get file size : GetFileSize ; get file creation, last access, last write time : GetFileTime ; set file creation, last access, last write time : SetFileTime | |
Re: ; check out this link: [URL="http://www.madwizard.org/programming/tutorials/mosaic/"]http://www.madwizard.org/programming/tutorials/mosaic/[/URL] | |
Re: ; check out this link: [URL="http://msdn.microsoft.com/en-us/library/aa389273(VS.85).aspx"]http://msdn.microsoft.com/en-us/library/aa389273(VS.85).aspx[/URL] | |
Re: ; just launch "devmgmt.msc" by winexec or by CreateProcess | |
Re: ; yes you can separate data in the text or any other extension file ;with some characters (e.g: "<Name>Max</Name>" and so on) or ;you can separate data with e.g.: 0A4h or some other non-letter or ;number character. ; then your program must search for occurrence of those characters ;and fill … | |
Re: ; because "cmp" instruction doesnt accept two memory operands ; CMP r , r/i ; CMP m , r/i ; instead of "cmp add1[si],add1[si+2]" ; try: mov dx, add1[si] cmp dx, add1[si + 2] | |
Re: [QUOTE]encryption any text of alphapets and numbers into a random characters[/QUOTE] ; do you want later to decrypt it back or no? | |
Re: ; i'm not sure if u can do that in "PE explorer" ; but in e.g.: OllyDBG you can edit the disassembled code of a ;program and then copy it to the .exe file "selection"->"copy to ;executable" ; and you can download it for free | |
Re: ; you mean storing it even after program close? ; then : In Registry (RegOpenKeyEx, RegQueryValueEx, RegSetValueEx ...) , In a File ( CreateFile, WriteFile, ReadFile ...), In .ini File ( you can easily do that by special API funcs (e.g: GetPrivateProfileString, WritePrivateProfileString ...)) | |
Re: ; it will print out "76" ; do means an action will happen and then it will check if the while ;statement is true, if so again it will go to do or else it will exit from ;do while loop I = I + 25; // it will add … | |
Re: ;Hi. ;Actually why did you compare eax with -9999 ? cmp eax,-9999 ;? ---------------------------------------------------------------- ;stdcall is pushing on the stack values in the opposite order: push val2 push val1 call myfunc |