3,892 Posted Topics
Re: In Rome, do the way Romans do... If someone wants you to do a project in WinAPI, you got no choice but to do in WinAPI or leave the project. It all depends on the client requirement because its the business requirement which drives the software development arena. It is … | |
Re: Post what you attempted so far or start reading the stickies at the top of C++ forum to aid you in programming. | |
Re: Some points: • Post your code in code tags. • Don't use [inlinecode]gets[/inlinecode] for accepting input from the user. Read [URL="http://www.daniweb.com/tutorials/tutorial45806.html"]this.[/URL] • Remove the semicolon after the if statement in your function. Its ruining your logic. • [inlinecode]m = (char) str1;[/inlinecode] The above statement doesn't do what you expect it … | |
Re: [code] #include <cstdlib> #include <iostream> #include <fstream> #include <iomanip> using namespace std; string getFileName(); void appendData( ofstream&, int, int ); int main(int argc, char *argv[]) { [COLOR=Red]ofstream fout;[/COLOR] // declare other variables int fun1 = 2; int fun2 = 45; // open output filestream for appending // get valid file … | |
Re: [QUOTE]I challenge you to supply a satsifactory answer![/QUOTE] My friend, I hope you do realize this is no battle ground where we can challenge our friends to duel... ;) [quote] I am working on a program that uses the graphics.h library functions and the 0x33 mouse interrupt. When I click … | |
Re: [quote=joeprogrammer;296587]Secondly, what features are you going to have, or what will PerlBB offer us webmasters that phpBB and the commercial vBulletin don't offer us already? You have to make some unique features in your software if you want people to choose your software instead of someone else's.[/quote] Thinking about such … | |
Re: Bumping your posts would do you no good. It would only result in a longer delay and is not encouraged. Patience wins the best help. [quote]I dont get it , what do you mean by "diffrent variables to keep track of the indexes" ?can you give me an example ? … | |
Re: Its first time for you, not for us. And btw, you already must have got the warning for not adding code tags. Remember to use them in the future. | |
Re: The best thing you can do is to create a blank project or if your project already contains the stdafx files, copy the header information from them into your main file and delete them. Since I don't have a MS Compiler with me right now, I can't verify the fact … | |
Re: [quote=iamthwee;324363][code=c] static int wordOccurrenceSort(const void *p1, const void *p2) { struct crap *sp1 = (struct crap *) p1; struct crap *sp2 = (struct crap *) p2; if (sp2->wordOccurrence > sp1->wordOccurrence ) { return 1; //not sure what value to assign? } if (sp2->wordOccurrence < sp1->wordOccurrence ) { return 0;//not sure … | |
Re: Something like [URL="http://www.codersource.net/win32_socket_ip_address.html"]this[/URL] ? | |
Re: You can do something like that in Managed C++ though it is not something a beginner should try out. But still [URL="http://www.codeproject.com/managedcpp/sendmailmc__.asp"]here[/URL] it goes... The same can be achieved using a third party library. Read [URL="http://www.emailarchitect.net/webapp/smtpcom/developers/vc.asp"]this.[/URL] Mind you, both the approaches are pretty daunting... | |
Re: The expression you just posted is an [URL="http://numbers.computation.free.fr/Constants/E/e.html"]infinite expression.[/URL] My understanding would be that continue till the limit of your data type is reached. When double is used for factorial computations, the limit is 170. Take a look at this: [code=cplusplus] #include <iostream> #include <cmath> double factorial (double value) { … | |
Re: What you want to know ? Sorting can be as simple as [URL="http://mathbits.com/mathbits/compsci/Arrays/Bubble.htm"]bubble sort[/URL]. A detailed description of that can be found [URL="http://www.devarticles.com/c/a/Cplusplus/Bubble-Sorts-And-C-plus/"]here.[/URL] | |
Re: Either he found the solution to his own problem or he is referring to Java's super class... ;) | |
Re: Good ones [B]Twilli[/B]. Now some from my side.... [B][U]Newton's Law for Engineers[/U] [/B][I]Law - 1[/I] Every Engineer continues his state of chatting or forwarding mails unless he is assigned work by external unbalanced manager. [I]Law - 2[/I] The rate of change in the Work is directly proportional to the payment … | |
Re: Maybe [URL="http://www.daniweb.com/code/snippet614.html"]this[/URL] and [URL="http://www.opengroup.org/onlinepubs/009695399/basedefs/errno.h.html"]this[/URL] should get you going well. | |
Re: [quote=WaltP;329988]Hmmmm so [I]that's[/I] what you do... [/quote] Hush..I guess you forgot that Davey can infract you...:mrgreen: | |
Re: [quote=WaltP;328077][B]Salem[/B]! How [I]could[/I] you!?!?![/quote] I guess there must have been a pretty good reason... Or maybe because system ("pause") is guaranteed to stop the console window no matter how much junk is left off in the input stream.When getchar ( ) is used, one must be pretty sure that the … | |
Re: [inlinecode]strcmp[/inlinecode] only works with C style strings and not single characters and strings. You are comparing a single character with a string which is wrong. If you want to compare two characters, you can do something like: [code=c] int comparision_result = strncmp ( str1, str2, 1 ) ;[/code] though it … | |
Re: Assuming that the condition is "The loop should only be executed again (since its a do while loop) when the first is less than second AND the third is not equal to fourth OR when the number of iterations is still less than 5", you should have something like this: … | |
Re: Your problem is that the newline character ([INLINECODE]'\n'[/INLINECODE]) which remains in the input stream after you give the choice (yes or no) is picked up by the [INLINECODE]getline[/INLINECODE] function and hence your program fails to run as expected. Either place a [INLINECODE]getchar ()[/INLINECODE] after the [INLINECODE]cin >> response[/INLINECODE] statement or … | |
Re: [quote=iamthwee;328566]Why don't you just follow the outline of the Cooley-Tukey algo?[/quote] Do you seriously think he expected an answer... ![]() | |
Re: Jnabeel, the problem in your case is arising because of faulty logic. You need to place three loops to create a generic matrix multiplier. Read up on matrix multiplications [URL="http://en.wikipedia.org/wiki/Matrix_multiplication"]here[/URL]. A sample implementation I came up with: [code=cplusplus] // UNTESTED #include <iostream> #include <iomanip> int main() { using namespace std; … | |
Re: Ankit, like Iamthwee said, strcmp ( ) coupled with [URL="http://www.cppreference.com/stdother/qsort.html"]qsort ( )[/URL] function should work out to be fine in your case. | |
Re: Hey there my [I]sunnyside [/I]friend, welcome to Daniweb. :D | |
Re: [quote=WaltP;328085]Except multiple returns from a single function is frowned upon. [/quote] Hmm...now that is some news ;) The statement is not absolute as such. It all depends on the problem under consideration. | |
Re: You can save iterations and the additional checking performed in the loops by doing something like: [code=cplusplus] #include <iostream> int main () { using namespace std ; int limit = -1, count = 1 ; bool isPrime = true ; cout << "Enter the limit: " ; cin >> limit … | |
Re: You need to tell us exactly what your code was supposed to do and what is it doing right now . I see an infinte loop there, you need to put an exitting condition.....oh is this the Coffee house.... Drats. :D ![]() | |
Re: [quote=joeprogrammer;316259]I'm a 5 year-old super genius. If you don't believe me, take a look at my profile: [URL]http://www.daniweb.com/techtalkforums/member73097.html[/URL] [/quote]Then I guess you ought to be banned since the minimum age is 13... ;) [quote]Of course, no one here is going to beat iamthwee as the youngest... [/quote]:mrgreen: | |
Re: And if you really feel like learning them in depth, read [URL="http://www.daniweb.com/techtalkforums/thread50370.html"]this[/URL]... | |
Re: Maybe something like [URL="http://www.codeproject.com/audio/midiwc.asp?df=100&forumid=230513&exp=0&select=1704192"]this[/URL] or [URL="http://www.codeguru.com/cpp/g-m/multimedia/article.php/c1573/"]this.[/URL] Though it would be of no use to use if you don't have a firm grasp of the language. | |
Re: Do you want something like this: [code] XXXX XXX XX X[/code] If so then you can do something like:[LIST] [*]Run an outer loop which will move from 1 to n. [*]Run an inner loop which will move from 1 to n. [*]If the inner loop counter is less than the … | |
Re: [quote=Lerner;328216]Assignment statements always return true, so the if statement is always true, irrespective of the value of found before this statement. [/quote] Well, not exactly. See this snippet: [code=cplusplus] int main (void) { int i ; if ( i = 0 ) { cout << "I AM entering the IF … | |
Re: A simpler way would be to convert each and everything to intger and do away with the floating point confusion and havoc. Penny - 0.01 Scaled Penny - 1 ( scaled by factor of 100 ) And in the same way, you scale the amount entered by the user and … | |
Re: [quote=sharky_machine;294775]~s.o.s.~ : This is particularly for you-- [B][COLOR=red]Iron Maiden[/COLOR][/B] in Rio, Brazil :cheesy: (We had another thread going for these type of things awhile ago-- I could not find that thread. Enjoy. [/quote] [quote=joeprogrammer;294795]Here's a [I]very[/I] cool video of a highschool boy playing the Pachenbell Canon on his rock guitar … | |
Re: Here is one [URL="http://javascript.internet.com/passwords/ascii-encryption.html"]implementation[/URL] in Javascript. Refer the [URL="http://www.asciitable.com/"]ASCII table[/URL] for more details. | |
Re: [LIST] [*][URL="http://en.wikipedia.org/wiki/Thread_%28computer_science%29"]Threads[/URL] [*][URL="http://en.wikipedia.org/wiki/Process_%28computing%29"]Process[/URL] [*][URL="http://en.wikipedia.org/wiki/Operating_system"]Operating system[/URL] [*][URL="http://en.wikipedia.org/wiki/Function_overloading"]Overloading and overriding[/URL][/LIST] | |
Re: Maybe you guys should create a thread to post the "exact kind of tutorials" you require (language, a particular concept etc.) so that if someone already has enough knowledge on that topic, he would consider writing a tutorial whenever he has got the time. | |
Re: What kind of graphics ? Graphics as in related to games or graphics related to GUI widgets like buttons, image boxes, text boxes etc. ? ![]() | |
Re: Why not post your attempt ? Read [URL="http://www.daniweb.com/techtalkforums/announcement8-2.html"]this[/URL]. | |
Re: [quote=spacecowboy123;327147]Hi All, The program I am writing is throwing up an error when it runs on this line [code] runArray[counter]++; [/code] i am trying to increment the number at location counter in the array. Is this the correct way to do this? Thanks[/quote] The above line is invalid if the … | |
Re: How about [URL="http://www.pickatutorial.com/tutorials/actionscript_1.htm"]this[/URL] and [URL="http://jayisgames.com/archives/2005/01/snake_flash_gam.php"]this[/URL] for a start ? Keep on googling and you will find lots of them. ![]() | |
Re: It is because the moment you put parameters, it becomes a function declaration rather than an object creation statement. | |
Re: You are better off creating a single team class and instantiating the different teams from that class since there are no specific attributes which would make you want a create a seperate class for each of them. You can create a vector variable in the Team class and the method … | |
The End.