3,892 Posted Topics

Member Avatar for alias47
Re: help

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]

Member Avatar for ~s.o.s~
0
117
Member Avatar for pugg09

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) …

Member Avatar for ~s.o.s~
0
105
Member Avatar for snedan

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]

Member Avatar for ~s.o.s~
0
100
Member Avatar for Dani

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 …

Member Avatar for ~s.o.s~
0
325
Member Avatar for amen

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.

Member Avatar for ~s.o.s~
0
117
Member Avatar for clemente

I am closing this thread since it was opened reagarding a two year old query by someone.

Member Avatar for ~s.o.s~
0
100
Member Avatar for SlightlyAngelic

Post your code using code tags ( read the forum announcements ) And what exactly is the problem with the given code. Be specific.

Member Avatar for Salem
0
133
Member Avatar for pointers

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 …

Member Avatar for ~s.o.s~
0
102
Member Avatar for missg82

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 …

Member Avatar for ~s.o.s~
0
96
Member Avatar for suep

Everythign is possible using a third party graphics library. Research and you will find a lot of them out there.

Member Avatar for ~s.o.s~
0
88
Member Avatar for simmyhp

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]

Member Avatar for WaltP
1
103
Member Avatar for newbie2c++

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.

Member Avatar for WaltP
0
325
Member Avatar for kissiwat

Hmm yeah this thing has even happened to me quite a number of times.. Which browser you use Mr. Andor, i use Firefox ?

Member Avatar for Lerner
0
142
Member Avatar for DmozOrg
Re: Hi

Of course you are welcome here. Enjoy your stay buddy.

Member Avatar for happygeek
0
62
Member Avatar for Brent.tc
Re: Help

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 …

Member Avatar for WaltP
0
111
Member Avatar for The Dude
Member Avatar for e21_kam

Mybe something like: [code] string my_string = "1234" ; long i = strtol( my_string.c_str() ) ; // long = 1234 [/code] Hope it helped, bye.

Member Avatar for e21_kam
0
200
Member Avatar for tomtat
Member Avatar for ~s.o.s~
0
100
Member Avatar for pointers

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 }; …

Member Avatar for ~s.o.s~
0
88
Member Avatar for ReDeViL

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.

Member Avatar for ReDeViL
0
137
Member Avatar for madankumar

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 …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for anksphenomenon

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. …

Member Avatar for ~s.o.s~
0
90
Member Avatar for aismm

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 …

Member Avatar for andor
0
218
Member Avatar for tehloki

Using &quot;scanf&quot; 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]

Member Avatar for tehloki
0
251
Member Avatar for stymiee

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 …

Member Avatar for letsjoy
0
405
Member Avatar for rgbivens

Na.. he is afraid that his friends might stumble across this same snippet while reasearhcing and submit the same as assignment.

Member Avatar for WolfPack
0
225
Member Avatar for Mr.UNOwen

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, …

Member Avatar for TylerSBreton
0
120
Member Avatar for AnG'

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++....

Member Avatar for AnG'
0
127
Member Avatar for ~s.o.s~

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 …

Member Avatar for Dani
0
208
Member Avatar for doraemon

[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 …

Member Avatar for doraemon
0
216
Member Avatar for SammyHasibi

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 …

Member Avatar for SammyHasibi
0
97
Member Avatar for ~s.o.s~

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 …

Member Avatar for Dani
0
241
Member Avatar for jhdobbins
Member Avatar for ~s.o.s~
0
157
Member Avatar for HLA91

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.

Member Avatar for ~s.o.s~
0
101
Member Avatar for roryt

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.

Member Avatar for tgreer
0
129
Member Avatar for Stoverus
Member Avatar for ~s.o.s~
0
31
Member Avatar for mehakkapur

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].

Member Avatar for mehakkapur
0
67
Member Avatar for stupidenator

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]

Member Avatar for iamthwee
0
1K
Member Avatar for boule

[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 …

Member Avatar for Salem
0
162
Member Avatar for muhaa

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 …

Member Avatar for muhaa
0
133
Member Avatar for nick937

[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].

Member Avatar for ~s.o.s~
0
107
Member Avatar for mitchelltab

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 …

Member Avatar for Lucanio
0
133
Member Avatar for vegaseat

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 ?

Member Avatar for Dani
0
201
Member Avatar for matrimforever
Member Avatar for matrimforever
0
129
Member Avatar for boujibabe

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 …

Member Avatar for boujibabe
0
170
Member Avatar for The Dude
Member Avatar for WolfPack
0
112
Member Avatar for venomlash

[quote=vegaseat;263957]Again, it depends on which country you live in. Not all keyboards have a & key!!!! Actually &quot;and&quot; looks a lot more readable than &quot;&&&quot;. 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 …

Member Avatar for vegaseat
0
202
Member Avatar for markov

[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 …

Member Avatar for ~s.o.s~
0
106
Member Avatar for FireSBurnsmuP

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).

Member Avatar for ~s.o.s~
0
115
Member Avatar for matrimforever

[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, …

Member Avatar for ~s.o.s~
0
2K

The End.