3,892 Posted Topics
Re: Select the edge with the minimum cost. Maybe you should try lookiing at the followign places: The algorithm: [url]http://students.ceid.upatras.gr/~papagel/project/pseukrus.htm[/url] The simulation: [url]http://students.ceid.upatras.gr/~papagel/project/kruskal.htm[/url] | |
Re: Huh.. where did you come up with the weird syntax from... [quote=pugg09;269429][code=c] //[COLOR=Red]template <typename T> -[/COLOR]---> wrong way of using templates template < class T > class typeClass { private: T myArg; //---->I was trying to use 'T myArg' public: }; template <class T> // correct way void something(T myArg) … | |
Re: Just on an ending note, wanted to point out: [inlinecode]system("pause") ; // dont use this function, its non portable and expensive call[/inlinecode] [inlinecode]cin.get() ; // use this function instead[/inlinecode] | |
Re: Hmm just wanted to tell you Miss Dani that when i click on the search tag word "search" no new window opens up, nothing loads in the page itself. I have to use the option "open in a new tab" to come up with the result page. I am using … | |
Re: Hey there, this is the second time in a row you are bumping an age old thread. Please see the date of the last post before posting new content. The OP is no longer interested in this topic. Thread closed. | |
Re: I am closing this thread since it was opened reagarding a two year old query by someone. | |
Re: Post your code using code tags ( read the forum announcements ) And what exactly is the problem with the given code. Be specific. | |
Re: I get two values not one. BTW printf returns the number of characters it has printed and the inner statement is always executed first though it is not wise to assume the order of execution. Try this program: [code=c] int main() { while(1) { if(printf("%d",printf(" %d"))) // the inner printf … | |
Re: You were just asked to specify your requirements in a more specific manner and what you do is start a fight about ego. Judging from your reply, its "you" has got a lot of ego coz instead of clarifyign the situation you just act like a kid and blame the … | |
Re: Everythign is possible using a third party graphics library. Research and you will find a lot of them out there. | |
Re: Dont you think the check part written by me for your previous post is a bit er.. easier and simpler. Why not have a look at it here: [url]http://www.daniweb.com/techtalkforums/post266165-5.html[/url] | |
Re: Anwer to your question has alread been anwered by Mr. WaltP. [COLOR=Red]// What is the starting value of total? It isn't 0. You never initialized it [/COLOR]Incorporate that change and post your code in code tags so it is in readable form. See the forum announcements for it. | |
Re: Hmm yeah this thing has even happened to me quite a number of times.. Which browser you use Mr. Andor, i use Firefox ? | |
Re: Hmm.. looks like you really new to programming. "main()" as you say is the entry point for the program you write. Syntactically and technically you cant write anything outside main except macros, function definations and declarations, and global variables. So if you want to write "cin" outside main create your … | |
Re: Definately cooool. Must see for all. Great work Dude | |
Re: Mybe something like: [code] string my_string = "1234" ; long i = strtol( my_string.c_str() ) ; // long = 1234 [/code] Hope it helped, bye. | |
Re: Or maybe here, [url]http://www.daniweb.com/code/snippet533.html[/url] | |
Re: Static functions are functions which have no implicit "this" argument, can access only static data members and can be called with or without instantiating a class. eg. [code] class Shape { static double trans[2][2] // a transformation matrix // ... public: static void scale(double s); //multiplies trans with s }; … | |
Re: Are you sure you have got the pattern right, coz it seems a bit..weird. If your question is related to drawing [search]pascal triangle[/search] like structure you can search for it in the code snippets section by clicking on the keyword above. | |
Re: Hm.. Mr. Dragon, I think there is a typo mistake coz the code will not compile. And what the OP wants is "static friend function". @Madankumar: By static do you mean "static storage class" or "static linkage" ? If you mean "static linkage" then friend function can be static. As … | |
Re: And.. thats why most of the new languages make the pointer mechanism transparent to the user by allowing the user to ONLY pass reference variables to the functions or let the user create only reference variables which occupy on the free store rather than on the limited space of stack. … | |
Re: The correct way of using fgets is fgets( char*, size_t, file_stream ). Since you pulling the user response from the std input stream ie the keyboard, you have to put stdin in place of fr since the stream under consideration is the std input and not the file stream. Also … | |
Re: Using "scanf" to read character input is a recepie for disaster, however small the purpose maybe. Post your entire code and I will show you an alternative. PS: ALso declare your array as [inlinecode]char sequence[ BUFSIZ ] = {'0'}; [/inlinecode] | |
Re: I had come to this thread to post my postion and what do I see. Curse you hijackers (To Wolfie and Mr. DMR) Hope Mr. Happygeek comes down on you with his stick which he is at present bringing down on blog spammers (its really a big one from what … | |
Re: Na.. he is afraid that his friends might stumble across this same snippet while reasearhcing and submit the same as assignment. | |
Re: Actually it depends... Mr. WaltP's point of view is based on portable coding practices and using the standard functions so that the code can run irrespective of the machine. Mr. Dragon's point of view is based on a better implementation for a single platform. So you can chose your pick, … | |
Re: Hmm maybe you need to look up on associative arrays [URL="http://www.sgi.com/tech/stl/Map.html"]HERE[/URL] But with your sparse knowledge of C++.... | |
Hey Miss Dani, i was just wondering if it would be possible for you to add the functionality of keeping the buttons "Warp Iilinetags", "warp code tags" to the Quick reply WYSIWYG editor, since it has some extra space or unused space at the right corner. Those are the basic … | |
Re: [quote=doraemon;265860]So, if I want to test some program from the command-line, should I always include for example like this part in my program? [code] int main( int argc, char * argv[]) a = atof ( argv [1] ); b = atof ( argv [2] ); [/code] [/quote] Those things are … | |
Re: Factorial values may easily go out of hand and overflow due to their exponential nature. So if you insert very high values of "n" the output might overflow. Please paste your output along with the input you giving, along with the function combination def. (just in case). Also dont use … | |
Hi there everyone. I have recently seen many posts in which people are really happy with the resources provided in that thread and post their thanksgiving making the thread lose its purpose. Even newbies resurrect dead threads just to say thanks. I was wondering why not make DaniWeb a no … | |
Re: Dont ressurect old threads like you were some shaman. Thread closed. | |
Re: Download python from [URL="http://www.activestate.com/store/download.aspx?prdGUID=b08b04e0-6872-4d9d-a722-7a0c2dea2758"]this site[/URL]. It is one of the distributors of Python which bundles alll the files and features in a single package, taking care of setting up all the paths for you. | |
Re: He means that it is good you think that practice makes a man perfect. Dont get him wrong, he is just trying to help you out. | |
Re: Ok so how should we say "Hello there, my name is ...." in Icelandic | |
Re: YOu can refer [URL="http://www.daniweb.com/code/snippet445.html"]this[/URL] code for reference and start off with your assignment with ease. Also for explanation look [URL="http://www.google.co.in/search?hl=en&q=round+robin+scheduling&btnG=Google+Search&meta="]HERE[/URL]. | |
Re: Post what have you got till now. I dont properly undestand your question, but if you looking for the explanation for how to convert character to code you can look at [url]http://en.wikipedia.org/wiki/Huffman_coding[/url] ![]() | |
Re: [quote=Ancient Dragon;264825]see sizeof() operator -- but the size of a pointer is always the same on 32-bit compilers.[/quote] Hm.. Mr. Dragon, i think you are confusing it with something else. The OP wants the size of the "activation record" and not the variable. For eg. when the program control enters … | |
Re: Any leads you have got so far, post your code or your algorithm and we will help you out. Posting out what you want to do is no good to us in helping you. PS: If you want to write random data, use the normal random function which will generate … | |
Re: [quote=nick937;265045] [code][COLOR=Red]if(rom=='IV' || rom=='iv')[/COLOR] { tot=tot+4; } [/code] [/quote] That ain't character comparision. 'iv' is not counted as a character. A character implies "only one character" so you end up comparing only the first character i.e. 'i' in your case. Try using string comparision functions like [INLINECODE]strcmp()[/INLINECODE]. | |
Re: Please localize the errors or the problem areas so that we can help you out. Just dumping this big code is a bit daunting to read. Tell us which of your functions are not functioning properly and post only those. Eg. is the insertion going on properly, is there problem … | |
Re: The same is happening with me. Even i cant seem to find the "Contribute a snippet" button anywhere on my screen. Some PHP script error or what ? | |
Re: Dont talk in riddles, post the entire code and we will help you out. | |
Re: Various conditions can exist depending on the value of check, you havent checked them all. For theory of quadratic equations check here: [url]http://mathworld.wolfram.com/QuadraticEquation.html[/url] [url]http://en.wikipedia.org/wiki/Quadratic_equation[/url] Also if you taking about the precedence when writing down complex and long statements as in case of quadratic eq. solution, use parantheses instead on relying … | |
Re: Heh definately the beginning of a brave new world for me :D | |
Re: [quote=vegaseat;263957]Again, it depends on which country you live in. Not all keyboards have a & key!!!! Actually "and" looks a lot more readable than "&&". Dev-C++ uses a much more international open source GNU compiler.[/quote] As expected from a Python proponent :D But seriously, i agree with Mr. Iamthwee, its … | |
Re: [quote=markov;264837]Hi cscgal ! Thanx for your immediate response ! I don't find any other active persons apart from you, why is this so ?[/quote] This is because she is the site owner and admin and all the things related to site under are her control. So if you face a … | |
Re: Its also a good practice to make your destructor virtual, and in that way you can be sure that when you start building hierarchies, you dont start wondering where all the memory leaks a coming from (child class object is not automatically destroyed if you dont make destructor virtual). | |
Re: [quote=matrimforever;264119]Okay still getting errors, and I don't know if what I have is actually going to do what I need it to do, but here goes: [code] [COLOR=red]u[/COLOR]sing namespace std; [COLOR=red]// u wasnt there[/COLOR] char pizzaType; [COLOR=red]// dont make this global, put it in main[/COLOR] void getData(int[COLOR=red]&[/COLOR] length, int[COLOR=red]&[/COLOR] width, … |
The End.