1,362 Posted Topics
Re: What mrboolf said is correct, you're displaying the address of the costs array. Also, put line 91 before the output in line 89 - you are not storing the computed cost to the cost array till after display. The [icode]<<fixed<<showpoint<<setprecision(2)[/icode] are sticky settings, they don't need to be in the … | |
Re: Mmmmmmm, beer! Here's some [URL="http://thinkexist.com/quotations/beer/"]quotations [/URL]about the wonderful brew. | |
Re: I think the problem here is you need to also define copy constructor and operator= methods. Since you are allocating pointers in the constructor, the system provide shallow copy is not sufficient. When c has been assigned the result from temp, at destruction time temp has been destroyed, and thus … | |
[URL="http://gizmodo.com/5090397/10-gadgets-that-have-no-business-using-a-jet-engine"]What to do with too much time and money?[/URL] | |
[URL="http://www.youtube.com/watch?v=P5_Msrdg3Hk"]Funny movie[/URL]. There's a moral to the story. | |
Re: In the malfunctioning sample, you have parameter names for the get function the same as the class's members. In the function, the parameters are in local scope, so the [icode]x=x+2;[/icode] is only referencing the parameter passed in. Thus, you are adding 2 to the uninitialized value of main's X. How … | |
Re: I had an inkling at first, from the rhythm. But wasn't sure till later on. | |
Re: Keyboard vid - been there ,done that. Got the key imprints in fist to prove it ;) Treadmill - wonder if there's someone with a remote control hooked up to it? That would be a wicked prank. | |
Re: [code]while (x || y != 00) ;[/code] You cannot compare in that fashion and get the result you want. What your statement says is [icode] while ( x OR y ) not equal to 0[/icode] which compares the boolean result of ORing x and y, comparing that result to 0. … | |
Re: The [URL="http://sdmines.sdsmt.edu/cgi-bin/global/a_bus_card.cgi?SiteID=228101"]average starting salary for recent undergrad CS majors[/URL] from my university is $56K. | |
Re: The problem is paramter "p" to the function. Since it's passed by reference, and if you don't reset it (as I assume you don't want to), it comes back into the function at a value greater than 0. Actually, it will be 4 with the data you show. When you … | |
Re: I agree with WaltP - the for( ; ; ) is really less clear your intent than while(true) - if you think that's too long, then while( 1 ). Really, how often do you really mean to have a loop be infinite? When you see either of those constructs, that … | |
When I first saw a book on the shelf, in the computer section of the bookstore ,with this title, I was confused. Really, why would they have picked that TLA for Project Management Professionals? It's just begging for jokes. Does a PMP drive around in a big convertible Cadillac with … | |
Re: Your prompt to enter a row should be just inside the outer (m) loop, since that loop controls rows. Also, normal style for for loops is to compare counter < limit, rather than your convoluted counter <= limit-1. Why is your inner loop a while, instead of also being a … | |
Re: That's handy, as neither Google translate nor Babelfish do British to American - which are nearly different languages. | |
Re: Before you can shuffle the deck, you need to assign values to it. Maybe something like: [code] int i; for( i = 0; i < 52; i++ ) deck[i] = i+1; //assuming you want values 1-52 [/code] Now that you have some values, shuffling makes sense. | |
Re: If you're referring to your array Items, then you've got to use the strcpy( ) function to copy from one index (a row of your 2D array) to another. This line [code] if ((choice != 1) && (choice != 2) && (choice != 3) && (choice != 4) && (choice … | |
Re: I find that it compiles fine, after you take the excess [icode][numberOfNodes[/icode]. I would think that removing the const keyword from your parameter list would clear the error you're getting. FYI, you're not declaring or allocating a 2D array. [icode]bool* matrix;[/icode] will be a 1D array only. (using VC++ 2005) | |
| |
[URL="http://www.youtube.com/watch?v=q96n_nnDhxU"]Ad for Lenovo[/URL] (Disclaimer - not responsible for whatever you actually do.) | |
Re: First, do you know how to code a sort? You could read your textbook or look [URL="http://tinyurl.com/6jh368"]here[/URL] Once you can sort one array, simply modify the function to take both the names and numbers arrays. Sort based on names - every time you move two names about, make the same … | |
Re: [QUOTE=Se7Olutionyg;743100]help help please[/QUOTE] Please please stop making new threads for same subject. | |
Re: The first two are because you have local variables in main( ) with the same names as your functions - the compiler looks to the nearest defined name (the int's), which are not functions. What are these lines supposed to be doing? [code] while (depth == 0); [/code] [code] END … | |
Re: This [code]while (solution != blank) { //play game until the 'blank' puzzle becomes the 'right' answer [/code] is not going to work. You cannot directly compare the strings this way. Look up use of strcmp( ) function. Your guess checking block seems to be flawed [code] //check guess! int State … | |
Re: And here's a tip to get you started: % / | |
Re: sin( ) and cos( ) take angles in radians, not degrees. Take your degree angle and multiply by (PI/180). Note that you will find a very good value of PI in the cmath library - check what you need to access it with your compiler. | |
Re: What a hoot! Makes about as much sense as some other belief systems. | |
[url]http://images.google.com/hosted/life[/url] [quote]Search millions of photographs from the LIFE photo archive, stretching from the 1750s to today. Most were never published and are now available for the first time through the joint work of LIFE and Google.[/quote] Wow, google is good - photos going back to the [b]1750s![/b] That's about 70 … | |
Re: Try posting in the appropriate Software Development forum. Present more specific details of what you want to accomplish. Take a stab at it and post your code, ask questions about it. Read the sticky posts and announcements in the forum you choose, so you follow the accepted process there. | |
| |
Re: Check out [URL="http://www.dreamincode.net/forums/showtopic64162.htm"]this sample[/URL] | |
Re: [b]RTFM - Read The Full Message[/b] They tell you where the problem is and what it is. Even if you don't fully understand the messages, they're pointing you to the problems. Look closely. | |
Re: Not quite as grand a victory, but setting up a power adapter for my wife's dollhouse jukebox. She got a [URL="http://www.hallmark.com/webapp/wcs/stores/servlet/ProductDisplay?catalogId=10051&storeId=10001&partNumber=QXG7244_DK&rank=P1R2S&searchValue=song&fromSearch=true"]Hallmark Christmas decoration that's a jukebox [/URL](it plays about 4 different Christmas songs and flashes lights) that's meant to plug into a string of lights on the tree. She wants … | |
"At roughly 4:30 p.m. Eastern time last Tuesday, the volume of junk e-mail arriving at inboxes around the world suddenly plummeted by at least 65 percent, an unprecedented drop caused by what is believed to be a single, simple act. " Read the rest [URL="http://www.washingtonpost.com/wp-dyn/content/article/2008/11/18/AR2008111801120.html?nav=rss_technology"]here [/URL]- quite eye opening. | |
Re: What is your problem with [icode] result[i] = Customer(f,s,bal);[/icode] What does Customer( ) return? | |
Re: [URL="http://www.streamdrag.com"]Here's another good one[/URL] for finding music, plays music and videos from youtube. | |
Re: from the results of googling this problem, bad keyboard or keyboard cable seem likely. If you want to try repairing/replacing components, here's a good link on how to open it up: [url]http://www.uofr.net/~greg/hardware/hp_pavilion_n5430_disassembly.html[/url] Val | |
Re: For starters, the partition function seems to be missing a lot of array indexes | |
Re: Which compiler are you using? VC++ Express versions don't have the MFC or ATL components. | |
Re: Hmm, write a little program that will read the file and store it, properly formatted as a declaration of a string with that content as the initialization, saving as a .h file to be included in your program? Run that prior to compiling the primary application. | |
Re: And also pay attention to where the error message points you. It should include the line number of the code where the compiler believes the problem is. This will at least focus your attention to the right place. Beware that sometimes the actual problem is a line or two or … | |
Re: No, cin >> does not take in the newline. Your problem is the processing loop [code] for (int i = 0; i <= strlen(code.c_str()); i++) [/code] Running your loop to <= string length means you are processing the NULL terminator at the end of the string. Loops for handling strings … | |
Re: You mean something like [URL="http://www.daileyint.com/build/buildtoc.htm"]this[/URL]? |
The End.