381 Posted Topics
Re: [QUOTE=Kazastankas;141590]Wouldn't that trap high at 1 and low at 0? Perhaps 1, 1 are what you meant as starting vars.[/QUOTE] No, and it works perfectly. For example: the 10th of fibonacci: [code] high = 1 ; low = 0 ------------------------ high = 1 ; low = 1 high = 2 … | |
Re: [QUOTE=TheNNS;513410]knight online, free MMORPG with no ads or anything. similar to world of warcraft but there literally infinite number of quests and missions, and the highest level you can reach is about 500, unlike wow which is only 70.[/QUOTE] I believe that the limit level of Knight Online is 80. … | |
Re: [code] for (i=0; i < [COLOR="Red"]pop[/COLOR]; i++) { randomno = (rand()%total); cout<<"Random Number = "<<randomno<<endl; for (j=0; j < [COLOR="Red"]pop[/COLOR]; j++) if (randomno > [COLOR="Red"]running_tot[i][/COLOR]) for (k=0; k < [COLOR="Red"]chro[/COLOR]; k++) { [COLOR="Red"]par[i][k][/COLOR] = mosome[j][k]; j = pop + 1; cout<<"Par ["<<i<<"] = "<<[COLOR="Red"]par[i][/COLOR]; cout<<endl; } } [/code] I don't … | |
Re: How about my solution. Faster and can handle more rows. However, this code is written in C. I will translate it to C++, if you want. [CODE]#include <stdio.h> #include <stdlib.h> int main() { int n, i, j; printf("How many rows you want to show?: "); scanf("%d", &n); for (i=0; i<n; … | |
Re: [LIST=1] [*]Thinking about what kind of project should I start. [*]Trying to find what need to be done in that project. [*]Starting to complete a few tasks. [*]Getting tired. [*]Give up. [/LIST] | |
Re: Instead of discuss about the best book, why not discuss about the best language for him to learn? hkhk106, you are great father :D | |
Re: You can also use smart-pointer technique. [code] template <class T> class auto_ptr { private: T* ptr; public: explicit auto_ptr(T* p = 0) : ptr(p) {} ~auto_ptr() {delete ptr;} T& operator*() {return *ptr;} T* operator->() {return ptr;} }; [/code] | |
this function will calculate a string formula which support cos, sin, log, abs, mod, and example : [10*2+(2+3)]/(5 mod 4) and you will get the answer, and this function it really easy to plugin with you code. | |
Re: Not everything programmed in C++ is faster than VB.NET. It is just matter of using the right data structure and the right algorithm for your problem. | |
Re: It seem like you put [icode]free(array);[/icode] in the loop instead of outside of the loop. | |
Re: I am assuming that each category has its own unique name. With your current query which you have already ordering the record by category name, it is very convenience to arrange it into tree. [CODE] Dim currentCategory As String = "" Dim currentParent As TreeNode While DR.Read If currentCategory <> … | |
Re: How about "Swap Algorithm"? I think everyone at least used it once in programmer life. | |
Re: Without knowing your table structure, there is nothing that I can help with. | |
Re: [QUOTE=battlex2010;1663169]I have made picture viewer in VB which also shows all the pics present in a folder as thumbnails using image list and listbox. The problem is whenever the user clicks refresh it takes long time for the image to load. I want to some how make a cache like … | |
Re: [QUOTE=RockT;1663340]Maybe this is the simplest thing ever but i'm a beginner trying to learn at least 1 language. How come the Script below keeps displaying the Else message until it finds the string? I was expecting for it to display 1 single Box whether it was found or not? why … | |
Re: The easiest way would be trying get the control by its name and return Textbox object. [CODE] Public Function GetTextBoxByItName(ByVal name As String) As TextBox For Each value As Control In Me.Controls If value.Name.ToUpper = name.ToUpper Then Return value End If Next Return Nothing End Function [/CODE] To use this … ![]() | |
I have been using Shared Hosting for a while. Recently, my website is getting bigger and Shared Hosting is not very reliable in term of speed. So I decided to bought a Windows Virtual Dedicated Server from GoDaddy. [B]This Virtual Dedicated Server will only be used to host one website … | |
Re: Welcome to DaniWeb, hawkmcdowell85. First of all, I don't really understand what is the purpose of what you are trying to make. However, lets break problem into smaller pieces and solve it one by one. [QUOTE]There is a folder on a PC (\..\Mail\Messages) that contains several XML files that are … | |
Re: It is almost impossible to reduce physical space that you need to store those result unless you change how your program works. Your problem can be written within a single SQL query [code] INSERT INTO res_sup_per SELECT res1.code,res1.`date`,res2.`date` , res1.value,res2.value,((res2.value-res1.value)/res1.value)*100, res1.`type` FROM res_sup AS res1 INNER JOIN res_sup AS res2 … | |
Re: [QUOTE=Rajesh R Subram;1578107]@WaltP: It is better, because that's what is the standard: From Bjarne's FAQ: [URL="http://www2.research.att.com/~bs/bs_faq2.html#void-main"]http://www2.research.att.com/~bs/bs_faq2.html#void-main[/URL][/QUOTE] I don't see anywhere stated that [icode]int main(int argc, char* argv[])[/icode] is better than [icode]int main()[/icode]. I wonder whether [icode]char main()[/icode] is acceptable? | |
Re: I haven't read through anything, but I will give a vote for wasting around 60 minutes of your life writing long post. Take it as encouragement. | |
Re: Instead of correcting your code (which is in the mess), I would rather simplify the solution. Let break the problem in small pieces and solve it one by one. First of all you want to create a table displaying the base to the power of the minimum exponent to the … | |
Re: Try [icode]while (c == 'y' || c == 'Y')[/icode] and [icode] if (c == 'n' || c == 'N')[/icode] | |
Re: [QUOTE=firstPerson;1573445]No offense to them, but I would say there are like 9 experts in C++ in the whole world, by experts, one who knows the language inside and out, so I wouldn't say they were experts, but rather, knowledgable.[/QUOTE] It's rather hard to define "C++ experts". Is only knowing the … | |
Re: Programmers determine when it is good or when it is bad to use [ICODE]goto[/ICODE]. It is not [ICODE]goto[/ICODE] that determines whether programmer is good or bad. It is perfectly fine to use [ICODE]goto[/ICODE] if you can maintain the readability of your code. Since most of [ICODE]goto[/ICODE]'s job has been replaced … | |
[B]Introduction[/B] [INDENT] Since this is my first thread in VB.NET forum(most of the time, I was in C/C++ forum), I want to share something that you might find it useful with your school project or with your works. Button is already a MUST-HAVE element in every program (I couldn't imagine … | |
Re: [QUOTE=majestic0110;527278]This is not my favourite quote but its depressingly true lol [B]behind every smile is a tear[/B][/QUOTE] I like that one, really true. | |
Re: [quote] with 100% accuracy unlike some algorithms [/quote] There is no any square root algorithm that guarantee a 100% accurate result. For example: Let's say what is 100% accurate result of square root of 2? [quote] greatest algorithm invented for calculating square roots? [/quote] [URL="http://en.wikipedia.org/wiki/Fast_inverse_square_root"]Fast inverse square root[/URL] is still … | |
Re: you can't do it there no easy to set command button forecolor. but you can use CheckBox instead, set Style = Graphical (it exactly look like button) , and copy this code in [code] Private Sub Check1_Click() Check1.Value = 0 End Sub [/code] there are hard way to do it … | |
Re: Well, even it is possible, what is the use of it? will it be anything useful? | |
Re: I have feeling that there is something wrong with function split(). Right now, I am not with my computer, so I can't compile your code. However, you allocate the memory without delete it at the end of the program. | |
I am looking for an article publishing script that support multiple-pages articles similarly to devpapers.com. I have searched for many scripts already and all of them are only able to post an article in a single-page. Thanks before hand Visal .In :P | |
Re: One more thing is that you should initialize each element of your array first. | |
Re: Following two simple steps and I am sure you will get help in here. 1. Embed your code in "Your Source Code Here" 2. Post the error messages. | |
Re: [INDENT][I]In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[/I] This definition is taken from Wikipedia.[/INDENT] | |
Re: [QUOTE]But once you converting string which has fixed value. Then how it can be treat as different value?[/QUOTE]The string you have is represented in decimal float-point, while [B]atof[/B] function converting that string into binary float-point. Some fixed values in decimal float-point cannot be exactly converted into binary float-point. In this … | |
Re: Getting a string line by line. If any line contains more than 20 characters, increase the counter. In this way, we can avoid counting a empty line because some people like to leave some empty lines to seperate one paragraph. | |
Re: It is hard to suggest any project when we don't even know what have you learned and what are you capable of. | |
Re: [quote] Not in C ..But hope this helps [/quote] Sorry, it does not help anyone. The post owner might be dead by now. | |
Re: [QUOTE=ALI SHER;500373]plz give me some hints to make a maze game using header files of conio.h and iostream.h i m just able to draw the game plz...tel me how can i do it i m beginner in c++" i tried my best[/QUOTE] Are you using Turbo C/C++ or Borland C++? … | |
Re: [QUOTE=WolfPack;507149]If you have 50 questions, the following code will print 10 numbers [B]within the range of 0 to 50[/B]. The same number may get printed multiple times, but you can get rid of that by modifying the code to re-loop if an already printed number is obtained. [CODE=cpp] srand( time(NULL) … | |
Re: [code] while(n > 0) { n /= 10; count++; } [/code] How about negative number? How about if my number is 0? [code] while (++count && n!=0) n /= 10; [/code] | |
Re: Pirate is absolutely bad in developed country; however, it can be very helpful for under-developing country. | |
Re: In my opinion, to start a successful study group, you will need proper guideline, monitoring your members, and having fun together. You need make them feel being paid attention on and belong to the group. Setting up your study group in other people forum limits flexibility in building that atmosphere. … | |
Re: First of all, I would have 2 variables; first one for storing Min, and the second one for shoring Max. While you input a number, you compare with the Min and Max. If that number is smaller than Min, then assign it to Min. If it is bigger than Max, … | |
Re: How do those hexadecimal numbers store? do they store as integer or string? | |
Re: Here the reasons : - If it support HTML mean they also support Javascript or VBScript - Users and affect virus, spyware, trojan - Mess up the forum, example you post </tr><tr> or something etc... - more.... | |
Re: If both linked lists are sorted, you can merge them in O(n). Since large linked list is already sorted. Then, all you need to do is sorting the smaller one. |
The End.