381 Posted Topics
Re: [QUOTE=firstPerson;961968]Your a cocky girl huh?[/QUOTE] Don't mess with Narue. Look at her avatar, you will get some idea :sweat: | |
Recently, I have wonder how to execute machine code instruction from memory in C/C++. I am aware of data execution protection. Anyway, I have this piece of code: [code=cplusplus] int main() { // allocate 2 bytes for storing machine code char* mc_add = (char*)malloc(sizeof(char)*2); int reg_eax; // for storing register … | |
Re: Took me 5 minutes to indent your code [code=cplusplus] /*This program removes duplicates from a sorted array of integers*/ #include <stdio.h> #include "genlib.h" #include "simpio.h" #include "strlib.h" #include "math.h" #define size 100 #define sentinel 0 void getArray(int arr[size]); int maxCycles(int arr[size]); void sortArray(int arr[size],int cycles); int indexMin(int arr[size],int low,int high); … | |
Re: Control array simply is a group of control that share the same name, same type, and same event procedures that increase flexibility of Visual Basic 6: [LIST=1] [*]Being share the same name and same event procedures allows VB6 programmer to reduce the amount of code. [*]Able to create new element … | |
Re: You can't simply compare 2 strings with operator ==. There is a function in library <string> called strcmp(). [code] Syntax: int strcmp(string1, string2) Return: Return 1 if string1 > string2 Return 0 if string1 == string2 Return -1 if string1 < string2. [/code] | |
Re: [B]1.[/B] Why create this function when you can simply compare two characters with operator ==. [code] int Check_Characters(char s1,char s2) { if([COLOR="Red"]s1==s2[/COLOR]) return 1; return 0; } [/code] [B]2.[/B] You have made same mistake again like your last post. First, you assign [icode]num = i[/icode] so that also mean [icode]num[/icode] … | |
Re: [B]kbhit() [/B]function is in [B]conio.h[/B] library and [B]conio.h[/B] is not a standard library which is not what Hiroshe want | |
Re: Learning AI is already existed except it is built to serve their specific purpose. I haven't seen any learning purpose-less AI. | |
Re: Here is your code and its logical error. [code] int RemoveChars(char *S,char c) { int i=0; int spaces=0; char temp; for(i=0;S[i]!=0;i++) { [COLOR="Red"]temp=S[i];[/COLOR] if(S[i]!=c) { [COLOR="Green"]// temp = S[i] and S[i] = temp, Hence, S[i] = S[i][/COLOR] [COLOR="Red"]S[i]=temp;[/COLOR] putchar(temp); } else spaces++; } return spaces; } [/code] So basically, the … | |
Re: Sorting concept is simple: from the least to the greatest or from the greatest to the least. To do so, you need to do comparison. So, the magic trick is comparison-rule (which is greater and which is lesser). For example: we got 5 points (consisting of x-axis and y-axis). [code=cplusplus] … | |
Re: [QUOTE=MrNoob;937283]it just returns 1 not more than that for int *num for first function[/QUOTE] How could *num go beyond 1 when your code does not allow it to go beyond that. [code] char *Strchr(char *String,char c,int *num) { char *ptr;//whish will be ptr to first stuff we found after that … | |
Re: If you truly understand the concept of doubly-linked list, these problems would be very easy. Lets start with basic doubly-linked list concept. Doubly-linked list data structure consist of 3 important components: set of data, pointer to address of previous data (*prev), and pointer to address of next data (*next). When … | |
Re: [code] while (tryanother [B][COLOR="Red"]=[/COLOR][/B] 'y') [/code] Change = to == | |
Re: [QUOTE=SP IT;901543]Yes. I just do not understand the logic that goes into the program.[/QUOTE] Posting the whole assignment will not help you or help us know what you have problem with. If you do not understand the logic, tell us which part that you don't understand. Tell us more about … | |
| |
* [B]Edit:[/B] Sorry about double negative on the title, I don't know how to edit it back First of all, I am fairly new to Microsoft Access VBA. I created a form with 2 textbox (txtUsername and txtPassword) and one label act as button (I use label instead of button … | |
| |
Re: This idea is great. Looking forward to participate in these challenges. | |
Re: What is your website about? How about article contest? Who write the best article will recieve the special award. | |
Re: My algorithm is a little bit different. First, I generate the random number into the array in order. Then randomly swap the array elements to make it disorder. For example: I want to generate 11 unique numbers from range of 1 to 1000. Firstly, I would fill my array with … | |
I am trying to make a simple engine with WinAPI and I encounter this problem: [code] class Window { .... public: [COLOR="Red"]static HINSTANCE hInst;[/COLOR] .... }; .... .... .... int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; [COLOR="Red"]Window::hInst = hInstance;[/COLOR] .... .... } [/code] The … | |
Re: Change [icode]=[/icode] to [icode]==[/icode] | |
Re: Why don't you do it on your own instead of copying someone else code? | |
Re: I do not know much about physic. However, I have recently read wikipedia about "Environmental effects of wind power". It points out a few disadvantages of windfarm. I will quote only the important parts: [LIST=1] [*][quote] Wind power consumes no fuel for continuing operation, and has no emissions directly related … | |
Re: It is quite simple. User input the value into [icode]number[/icode] not [icode]A[number][/icode]. So it should be [icode]sum = sum + number[/icode]. | |
Re: [QUOTE=TheNNS;653392]it's bullcrap. if you're gonna post something funny, make sure IT IS funny.[/QUOTE] It is not funny for you, but it is funny for us. | |
Re: [QUOTE=FragFighter;676644]Well, the release date is set for the first of September. Please let me know if you wish to be a tester.[/QUOTE] You can alway post your game here and we will give you comment. :) | |
Re: [QUOTE=zabr;677518]I know how to make the flow of the program, my only problem now is the conversion from hex to dec and oct to bin.[/QUOTE] Do you, youself, know how to convert from hex to dec and from oct to bin? If you know, then program your program to do … | |
Re: Blender3D is a 3d modeling tool, while [URL="http://en.wikipedia.org/wiki/Game_Blender"]Game Blender[/URL] is a tool to create a 3d application. | |
Re: Please explain it more clearly. I don't seem to understand what are you trying to do. | |
Re: [QUOTE=tiger86;676803]I have reached a new level of geek today one I will never forget! one of my blogs on daniweb became a featured blog and then was picked up by googles news and was on google top news stories![/QUOTE] Congraulation! | |
Re: [QUOTE=llmoney87;676793]hello everyone[/QUOTE] Welcome to Daniweb. You should introduce more about yourself here. For example, where are you from? what do you do? etc... | |
Re: [QUOTE] By the looks of it, you're supposed to manually manage the numbers. Edward's first attempt would probably use strings to store the numbers and then handle the arithmetic just like it's taught in elementary school with digit by digit calculations and saving of the carry or borrow values. That's … | |
Re: If [B]^[/B] is a exponentiation operator, then the [icode]sum[/icode] will be equal to the [icode]MyByte[/icode]. If the [B]^[/B] is a XOR operator, then the [icode]sum[/icode] depend on [icode]MyByte[/icode] Since: [code] [B]ABCD[/B] represents for MyByte binary. ABCD & (0010 ^ 0000) = 00C0 (it can be 0 or 2) ABCD & … | |
Re: How about try this code: [code=cplusplus] #include <iostream> int main() { std::cout << "Hello World"; std::cin.get(); return 0; } [/code] | |
Re: We don't even know what is your project? and what were your problems with the project. At least, give us more detail about your project and what you have done so far. | |
Re: [LIST=1] [*][URL="http://nehe.gamedev.net/"]Nehe OpenGL Tutorials[/URL] [*][URL="http://www.ultimategameprogramming.com/demoDownload.php?category=OpenGL&page=1"]Demo of Simple OpenGL code[/URL] [/LIST] | |
Re: I don't really like VB.NET, so the code is in VB6 [code] Function WordCounter(words) As Integer Dim strTemp As String Dim counter As Integer strTemp = Split(words, " ") counter = UBound(strTemp) For i = 0 To counter If strTemp(i) = "" Then counter = counter - 1 End If … | |
Re: [URL="http://www.daniweb.com/forums/thread63827.html"] Game Development FAQ's, Books and Resources[/URL] | |
I have argued with this guy for hours. In this conversation, I am [B]Silence[/B] and he is [B]link[/B] [code] [22:24] <link> Silence, how many times do you hack? [22:24] <Silence> link: hack me if you can [22:24] <link> I thought you were a programmer, yet you told me to hack … | |
Re: I have listened to it and I feel... I don't know... I feel normal. Maybe I've missed some points. hm.... | |
Re: Try this one [URL="http://www.softany.com/winchm/chm-maker.htm"]WinCHM[/URL] | |
Re: You might wonder why your problem hasn't been answered. It is obvious that you haven't use the code tag which make it very unfriendly to read your code. I recommend you to tag your code and post your error messages. Here is the key of having a successful question: (if … | |
The End.