1,362 Posted Topics
Re: Just remember, all women have ESP. They know when a guy is gonna get lucky. | |
Re: “Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, chocolate in one hand, champagne in the other, body thoroughly used up, totally worn out and screaming “WOO HOO what a ride!” … | |
| |
Re: Two programs can open the same file at the same time - at least in M$ world at the command line interface. In the Windows world, you might need to use something like [URL="http://msdn.microsoft.com/en-us/library/aa365203.aspx"]this[/URL] in order to enforce access restrictions to an open file. | |
Re: Please clarify - what is the pointer pointing to, a string or an int? Is your function supposed to do input? Your description sounds like its role is to validate something which was input elsewhere. If you are testing that a some string content represents a number, your loop is … | |
Re: Assuming that triangles 2-4 are just reflections/rotations of the first one - all being right triangles of size 10 on the perpendicular sides, all you need are variations of the program you have. You may have to make the inner loop decrement instead of increment. You may have to display … | |
Re: In VC++ 2008 on XP, I get the result you expect; the 7 value persists in number_value. [added] And just now in g++ in Fedora 10 I replicated your result. | |
Re: [QUOTE=ithelp;1011755]I can code it for $50,000 only, PM me for my paypal account :D .[/QUOTE] I'll write that code for $25,000 How low can the bidding go? Maybe this should move to Geeks' Lounge? | |
Re: Also, you indexing into the array at [i+1] and [i+2] will give you odd results for the first setArray-1 rows, and will go out of bounds in the last row. | |
Re: Oh, what a thorny question! First, I think the discussion should be broken into two parts. A - Real piracy, the manufacture and sale of bootleg copies of entertainment or software B - Casual file sharing Strictly speaking, both are violations of laws and EULAs. Are both equally amoral? A … | |
Re: You will only be able to know the number of elements in the array in the function in which it is allocated. If created as a local array, say [code] int some_array[] = { 1,2,3,4,5,6,7,8}; int size = sizeof( some_array) / sizeof( some_array[0] ); [/code] will give you the number … | |
Re: type float, 32 bits long, has a precision of 7 digits. While it may store values with very large or very small range (+/- 3.4 * 10^38 or * 10^-38), it has only 7 significant digits. type double, 64 bits long, has a bigger range ( *10^+/-308) and 15 digits … | |
Re: Err, umm, write the front end GUI in VB and call C++ dll code? | |
___________________________ [b][u]|My other computer is a CRAY|[/u][/b] | |
Re: This looks like a slightly tougher version of a typical nested loops problem. It seems the forum is squishing your output, so just to be clear, you expect something like : ..x.. .x.x. x...x .x.x. ..x.. (where the periods would be printed as blanks.) Have I got this right? In … | |
Re: Remove the const modifiers from your friend function, and it will work. I understand your desire to protect those parameters passed by reference, that seems to be the problem here. AD- sort( ) can be called with just the start and end iterators, I assume it makes use of the … | |
Re: Once your array is filled, it's not cheating to use a sort function. | |
Re: For the first one, look at the various find() string functions, for starters. For the second, that's been well discussed, a little search should help you find any of the several possible solutions. Best solutions do not require creating another string, but those can be the easiest. | |
Re: [QUOTE=scru;502537]Can somebody explain to me how presidential elections work? <snip> I don't get it...[/QUOTE] AD explained the outward mechanics of it all. What "really" happens is the candidate who can come up with the most money (meaning he/she becomes beholden to the special interests) and the most mud on the … | |
Re: And it opens up more seats for standby passengers. | |
I'm not sure that's really the right name for the [URL="http://gizmodo.com/5470587/computer-engineer-barbie-has-a-phd-in-fun-and-breaking-down-stereotypes"]newest career incarnation of Barbie[/URL]. Software Engineer I could go with, or Computer Tech Barbie. Computer Engineer Barbie should have a soldering iron and some wire strippers, and a box of IC chips. | |
Re: Using a switch to break out grades will only work if grades are given only in multiples of 10. What if a student gets a 95? Does he or she really deserve an F? Switches work by testing for an exact match, and only the values in your case labels … | |
Re: Shouldn't a couple of your variables be declared as arrays? You're treating them as such, but it won't work the way you want. | |
[URL="http://news.yahoo.com/s/livescience/20100414/sc_livescience/libraryofcongresstohouseentiretwitterarchive"]LOC will store all public Twitter posts.[/URL] Why is my tax money being used to save, index, catalog, and make available all this "data" that is, when you boil it down, 99.999% drivel and crap? Sure, right now the message content might only be in the low terabyte range, but … | |
Re: A. Your problem description and your comments about your situation aren't very clear. Rather confusing, actually. B. You have to attempt to solve it, then we will help you with any problems you encounter. But you have to put forth the effort first. Please read the sticky threads at the … | |
Re: First, tell us what you mean by it goes crazy? (I think I know, but you need to clarify the problem.) Your function should not be doing input or output. Use getline( ) in main(), and pass the string to the function. Keep in mind the job of a function … | |
Re: [QUOTE=teomurgi;1188304] is the input array dynamically allocated? In this case, do I have to use the delete [] in order not to have a memory leak? [/QUOTE] Not really. And strictly speaking, that is not a valid declaration in C++, you should get a compiler error as the array size … | |
Re: Whoa there, partner. Sorting the array of strings is pretty much like sorting an array of numbers. Don't get involved with the fact that your string array is 2D - you're only concerned with the 1D aspect. First, your function header [code]void bubbleSort(int C [] [COLUMN], int arraySize)[/code] Why is … | |
Re: Think about how you would do it with pencil and paper. Find a long bit of text in a book or magazine, then try different approaches to counting the letters. Yes, for loop(s) would be a good idea. You could do this with nested loops, or, if you set up … | |
Re: You set the min to 0. Will any score be less than that? For any min/max kind of problem, the best approach is to set min and max to the first data value, then start comparisons at the second element. Consider a set with just one value. Isn't that value … | |
Re: If you mean can you have a pointer that points to the contents of a column, such that you pass that pointer to a function expecting a 1D array and it will process that column, NOPE. You can have a pointer which points to the second element of any given … | |
Re: Worse yet, you start by (attempting to) copy a character that's one past the end of the source word. Depending on your compiler's implementation of the string, this could be a [b]bad thing[/b] (it is in VC++2008) | |
Re: [QUOTE=Ancient Dragon;909572]You need a vacation if you are dreaming about google :)[/QUOTE] If you dream in code, you really, really need a vacation. I really, really need a vacation. | |
Re: Reminiscent of those Stereo Sound Effects records that were common back when stereo LPs were a new thing. Listening to the ping pong game, the cars roaring by.... Oh, should this be in the "You know you're old...." thread? | |
Re: You need to actually declare the array in main( ). Your print function looks ok - you need one similar to that which fills in the array. It won't be much of a change from your print function. I do, however, question the sample output provided [quote]array is (2 * … | |
Re: Please use full words and sentences. Please tell us what errors, and where your compiler indicates the errors are. If the code compiles and runs but gives wrong results, explain what it should do and what it'd doing wrong. This is a big piece of code to just jump into. … | |
Re: We really need to see a bit more of the code - show the line the compiler error points to. Do you have [code] #include <fstream> [/code] in your file? | |
Re: If you use the Site Search box up above, with the terms "numbers to words" you'll find this is a common problem (we teachers love this sort of stuff!) The first thing you have to do is be able to break a number into the digits (thousands, hundreds, tens, ones, … | |
Re: [QUOTE=GrimJack;931849]VORTEX ACCUMULATOR BLACK MIRROR[/QUOTE] There's a minute of my life I wish I could have back. | |
Re: The place to turn this on/off is Edid | Advanced | View Whitespace. Keyboard shortcuts are Ctrl+R followed by Ctrl+W, or Ctlr+Shift+8. These toggle whitespace on or off. | |
Re: I'm thinking Cleverbot ain't so clever. Liza was pretty good in her day. [quote] Cleverbot: Who is God? User: I am. Cleverbot: Are you god? User: I said so. Cleverbot: Ye, I know you lost your brain. User: No, I'm not the Scarecrow. Cleverbot: You want to know about Persian … | |
Re: [code] if (eprep == examp) [/code] What is it you're trying to compare? If you want to know if the contents of array eprep and array examp are the same, you must compare them element by element, keeping track of any differences. What your statement asks is: Is the address … | |
Re: The program worked correctly for me, when I entered some flights and then chose the display. But Display is wrongly named - it's a Save. If you try to run the program and directly choose option 2, you are trying to save a list that has no nodes. Thus your … | |
![]() | Re: Three things. In the average function, you must initialize total to be 0, otherwise you are adding the pounds consumed to some random value. In your min and max functions, set the min or max variable to the first value found in the data. Using an arbitrary initial value (like … |
Re: or a better search term is: command line arguments | |
Re: Either you've posted the same problem twice under different user names, or someone's copying someone's homework. Earlier post by limengfang77 is exactly the same code. |
The End.