3,892 Posted Topics
Re: [quote=Narue;355838] Also, | is not the same as ||. The former is a bitwise OR and the latter is a logical OR.[/quote] Isn't it also a logical OR without the short circuit evaluation? [code=c] #include<stdio.h> int first() { printf("\nIn first function"); return 1; } int second() { printf("\nIn second function"); … | |
Re: [quote=joeprogrammer;355343]Looks like Mel forgot regular members can't view threads from the moderator forum. [/quote] That isn't a Mod forum -- its Area51. ;-) And btw Mel, congratulations to yet another spammer.... ;-) | |
Re: Why not use an API to simplify your task which handles all the resource management for you? Look [URL="http://audiere.sourceforge.net/"]here.[/URL] | |
Re: Though reinventing the wheel won't be such a good idea unless your aim here is to learn how to create custom parsers and not the game. | |
Re: Wasn't that difficult...I googled and the first thing I came across was [URL="http://www.style.org/unladenswallow/"]this[/URL]. The answer is ready at your disposal. ;-) | |
Re: Moving around chunks of memory using memmove would not be that good an idea. Think of it this way if the string consists of only spaces with just an alphabet at the end. The memmove implementation would move: (N - 1) + (N - 2) + ... + 1 bytes. … | |
Re: Dude, not to be picky, but lately you have been resurrecting dead threads. If you like a topic which was discussed way back, you can always create a new thread and start your own discussion. Thread bumping without a reason calls for bad forum manners... | |
Re: [URL="http://www.gnome.org/projects/dia/umltut/index.html"]Here[/URL] is a good UML tutorial. | |
Re: [quote]Hmm ... testing testing 1-2-3.[/quote] [quote]Test ... test ... another test [/quote] I guess this is the secret behind your "awesome" post count....:) BTW a distinct lag when I hit the "Post Quick Reply" button, but other than that, its okay. | |
Re: Oh well, mine is Mercury and for the obvious reasons...;) | |
Re: Your trainer doesn't seem like a [I]real [/I]professional to me. A professional would never make such a statement. As far as speed is concerned, system nowadays come packed to the boot with resources -- a couple of hundred MB of RAM, atleast a 1Ghz CPU. Performace -- yes. C/C++ beats … | |
Re: [quote=scarface3288;352851]I dont think this works please be more specific[/quote] You need to have the Boost API installed on your system -- only then you would be able to sun the mentioned example. ![]() | |
Re: Yes I agree with Joey, allowing new posters to affect reputation wouldn't be such a good thing. The reputaition here is affected by your date of joining, your own rep, the rep of the person you are repping and so on... | |
Re: [quote=MidiMagic;351327]I don't have an ad blocker, because they block a site I have to use.[/quote] It is really a good piece of software -- provided you know how to configure them. | |
Re: Previously there was a strict policy followed by us C++ mods to close the bumped threads immediately but with the new rule set in, we can at the most split the post and create a new thread out of it. Its been a while since I closed a bumped thread. … | |
Re: And what would that be.... ;-) | |
Re: Your classpath is not set, thats why it throws ClassNotFoundException. Make sure you set your classpath properly and do read the tutorials on Sun's site. Here is one of [URL="http://www.palowireless.com/java/tutorials.asp"]them.[/URL] | |
If you will notice, code tags behave differently in Java and C++ forums. Why can't we have a consistent formatting across forums? Personally I like the C++ one... | |
Re: The problem is not as simple as it looks to be on the surface. Too many things to be taken care of -- handling duplicates, sorting the ratings, associating the ratings with the names. You would have to come up with a better implementation than string arrays. Here is my … | |
Re: Would entirely depend on the graphic library you are using... | |
Re: Keep another variable outside the loop lets say [inlinecode]grandTotal[/inlinecode] and at the end of each loop do something like [inlinecode]grandTotal += loopTotal[/inlinecode]. Now this variable will hold the sum of all the totals. Don't forget to initialize [inlinecode]grandTotal[/inlinecode] to 0. | |
Re: > jwenting, I didn't see you turn on your irony mode. Does that mean all your posts before this were ironic? Yeah even I am surprised, JSP uses the XHTML like syntax which mandates an opening tag for each closing tag ... ;-) | |
Re: Did by any chance you mean SilverFall becuase there is no game which goes by the name of SilverFail.. :-) [URL="http://www.pro-g.co.uk/pc/silverfall/cheats.html"]This[/URL] looks promising. | |
Re: You are overly complicating things. Just use a simple counter which would be incremented each time a prime number is found and break out of the while loop when the counter exceeds 20. No need for iterators. Also querying the size fo a vector in each iteration would not be … | |
Re: Create three different classes each of them implementing the Runnable interface, each of them having their own relevant run() method. Create a driver class which would create an instance of the three classes, pass the instance to the constructor of Thread, call the start() method of the thread and you … | |
Re: [code=java] String str = "as as as as"; int count = 0; int limit = str.length(); for(int i = 0; i < limit; ++i) { if(Character.isWhitespace(str.charAt(i)) { ++count; } }[/code] | |
Re: [quote=bmgee13;351155]Thank you for your assistance, I do appreciate it. Although I am still unclear on the while statement, I have now used [COLOR=blue][B]While(result !=0). [/B][/COLOR][COLOR=black]However, I am now receiving the error message [COLOR=blue][B]error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup [/B][/COLOR][COLOR=black]I tried to look up this error message … | |
Re: Create a project, open a new file in that project, write your program, press the compile and run button somewhere at the top and you are good to go. That's it ! Which step are you specifically stuck at? | |
Re: Make the function val count return a vector of integers by making v_found as a vector of integers (vector<int>). Alternatly you can pass the vector reference to the function, and make the function modify the original vector. Print the returned vector or the modified vector in the main function. Something … | |
Re: You have to realize that floating point numbers are nothing but normal 32/64 bit datatypes with special interpretation of the bit pattern. If you are really interested, read [URL="http://www.cprogramming.com/tutorial/floating_point/understanding_floating_point_representation.html"]this.[/URL] | |
Re: Use a third party library like [URL="http://gmplib.org/"]this[/URL] or use a language which has inbuilt capabilites of handling such arithmetic like [URL="http://www.python.org/"]Python[/URL]. | |
Re: [URL="http://www.cplusplus.com/reference/algorithm/replace_copy_if.html"]Explanation + Implementation[/URL] | |
Re: You would be required to have an array of the size the same as the range of numbers to be generated. For eg. as in your case, the range is 5, hence create an array of 5 elements, and for each random number generated, do something like: [code=cplusplus] int frequencyArray … ![]() | |
Re: But if you still want to use delete (which would be a good thing), consider dynamically allocating the vector using the new operator. ![]() | |
Re: What do you exactly mean by handling telephone calls ? Other than that, all other things can be easily implemented using (or preferably) VB .NET or C#. | |
Re: The last else in the getChar() function has no return statement, that's what the warning is all about. It is always a better choice to set the return variable in the condition and return that at the end of the funciton. Something like this: [code=c] // Untested char getUserChoice () … | |
Re: Believe it or not, even if this font size looks bad, this is more like it. And btw Joey, 90% of the people don't think of increasing the size of their browser font, and end up reading as it is. Look at Devshed or any other professional site out there, … | |
Re: [code=cplusplus] // yourheader.h #ifndef _a_yourheader_included_ #define _yourheader_h_included_ class A { B m_b; C *m_c; D *m_d; public: void SetC(C *c); C *GetC() const; void ModifyD(D *d); }; #endif /************************************/ // yourcpp.cpp void A::SetC(C* c) { m_c = c; } C* A::GetC() const { return m_c; } void A::ModifyD(D* d) { … | |
Re: Have you tried out [URL="http://www.cs.utexas.edu/users/EWD/ewd07xx/EWD796a.PDF"]SmoothSort[/URL] ? Its best case is O(n) and worst case is O(n log(n)) with the obvious downfall of difficult to implement. | |
Re: You need to start learning C++ soon enough. Your code is nowhere near proper C++. We are here to solve your queries and not teach you how to compile your C++ programs. You are better off first reading some good books / tutorials and then come back if you have … | |
Re: [URL="http://javaboutique.internet.com/TextScroll/"]Here[/URL] you go...And please type proper English, its difficult to understand your posts. | |
Re: Hello. Its okay friends, everyone has his / her own opinions. Starting a [I]distro [/I]war would just result in getting this thread closed or someone getting infracted. I hope you guys understand... Have a nice day. | |
Re: Oh so here it goes... Hello my friend, welcome to Daniweb. Hope you enjoy your stay here. ;-) |
The End.