1,362 Posted Topics

Member Avatar for almostbob
Member Avatar for JamieLynnSEO
-2
502
Member Avatar for Michael_Knight

“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!” …

Member Avatar for happygeek
0
1K
Member Avatar for sneekula
Member Avatar for bumsfeld
2
935
Member Avatar for integer*09

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.

Member Avatar for enriquezrene_ap
0
154
Member Avatar for BBustos

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 …

Member Avatar for sdeez_alpha
0
5K
Member Avatar for timdog345

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 …

Member Avatar for coldzero_82
1
119
Member Avatar for cwarn23
Member Avatar for yapkm01

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.

Member Avatar for Apple4
0
146
Member Avatar for linta

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

Member Avatar for prvnkmr449
-6
216
Member Avatar for dexter1984

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.

Member Avatar for Maxwell175
0
141
Member Avatar for zandiago

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 …

Member Avatar for jon.kiparsky
2
982
Member Avatar for loushou

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 …

Member Avatar for daviddoria
0
139
Member Avatar for 2008macedonkon3

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 …

Member Avatar for Kanoisa
1
2K
Member Avatar for Dendei
Member Avatar for n.sehrawqat1987
0
94
Member Avatar for vmanes
Member Avatar for macgurl70
1
1K
Member Avatar for ASardinia1

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 …

Member Avatar for regnerz
0
423
Member Avatar for rootchord

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 …

Member Avatar for rootchord
0
640
Member Avatar for leesho
Member Avatar for s_sridhar
0
107
Member Avatar for jephthah
Member Avatar for jimJohnson

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.

Member Avatar for vmanes
0
86
Member Avatar for Dave Sinkula

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

Member Avatar for jephthah
0
6K
Member Avatar for HiHe
Member Avatar for vmanes

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.

Member Avatar for Ene Uran
2
213
Member Avatar for chubbs1900

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 …

Member Avatar for Computer Love
0
1K
Member Avatar for jbl09

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.

Member Avatar for caut_baia
0
244
Member Avatar for vmanes

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

Member Avatar for jwenting
2
174
Member Avatar for coder19

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 …

Member Avatar for vmanes
0
131
Member Avatar for fullyarmed

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 …

Member Avatar for fullyarmed
0
209
Member Avatar for teomurgi

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

Member Avatar for vmanes
0
342
Member Avatar for philipB

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 …

Member Avatar for WaltP
0
232
Member Avatar for Marine4God

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 …

Member Avatar for vmanes
0
110
Member Avatar for PSP1202

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 …

Member Avatar for PSP1202
0
117
Member Avatar for tr6699

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 …

Member Avatar for Ancient Dragon
0
99
Member Avatar for J.Killa

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)

Member Avatar for WaltP
0
226
Member Avatar for drjay1627
Member Avatar for Rashakil Fol
-1
107
Member Avatar for ithelp

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

Member Avatar for jephthah
1
162
Member Avatar for The Dude

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?

Member Avatar for Doctor Inferno
0
77
Member Avatar for omgaga

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

Member Avatar for vmanes
0
116
Member Avatar for Divyab
Re: HELP

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

Member Avatar for LevyDee
0
154
Member Avatar for yaoc1987

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?

Member Avatar for vbx_wx
0
138
Member Avatar for bullsfan127

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

Member Avatar for vmanes
0
195
Member Avatar for deckchairboy

[QUOTE=GrimJack;931849]VORTEX ACCUMULATOR BLACK MIRROR[/QUOTE] There's a minute of my life I wish I could have back.

Member Avatar for bumsfeld
1
373
Member Avatar for mrbright88
Member Avatar for GooeyG

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.

Member Avatar for GooeyG
0
87
Member Avatar for William Hemsworth

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 …

Member Avatar for vivosmith
2
426
Member Avatar for micmagicfly

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

Member Avatar for Banfa
0
96
Member Avatar for dinamit875

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 …

Member Avatar for mitrmkar
0
144
Member Avatar for Nick6425fl

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 …

Member Avatar for DawnDenise
0
322
Member Avatar for blackmagic01021
Member Avatar for mks200

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.

Member Avatar for WaltP
0
254

The End.