1,362 Posted Topics

Member Avatar for hpr12951

At least [URL="http://www.thescripts.com/forum/thread745758.html"]one[/URL]

Member Avatar for ithelp
0
122
Member Avatar for dvduval

But with Windows(r), you can do the same thing over and over again, and get different results. That's insane, as well. Val

Member Avatar for lasher511
0
134
Member Avatar for volia

It would help if you post the code you have, then those who help will have an idea of where to start. To begin with, have you constructed a loop that ends either when the user has a correct guess or has used up the eight attempts? How did you …

Member Avatar for WaltP
0
137
Member Avatar for Jicky
Member Avatar for kittycat07us

A. Indent B. Are you up to 2D arrays yet? C. Use of global variables is generally frowned upon - that's where a 2D array would help in being a single item to pass as parameter to functions. D. If it doesn't compile, what error message do you get? Where …

Member Avatar for Ancient Dragon
0
88
Member Avatar for tiffy1012

I NEED HELP PLEASE!!! WHAT AM I DOING WRONG!!! Not reading the compiler's error messages is the first thing. When dealing with arrays as arguments to function, you do not use the &. [code] void search( ArtWork [] ); // not ( ArtWork & ), thats for passing a single …

Member Avatar for vmanes
0
122
Member Avatar for zandiago

Anyone remember Thunderbirds and Fireball XL5 - the shows done with puppets/marionettes? Val

Member Avatar for zandiago
0
332
Member Avatar for pdhbaseball23

The problem is given in terms of rows of data, you show it in rows and columns. Why aren't you using a 2D array to store the data? That makes it much easier to keep track of where you are. The code you provided does not compile. It would be …

Member Avatar for pdhbaseball23
0
105
Member Avatar for adypan06

int main( ) { int matrix[10][10]; return 0; } Now, what do you need to do with it? What's the problem, show the work you've done, explain where you feel you are having difficulty. Val

Member Avatar for adypan06
0
50
Member Avatar for onelilfizzle

[QUOTE=Ancient Dragon;481831]doesn't work on MS-Windows os.[/QUOTE] Worked for me on XP, with VC++ 2005 express. After dropping the ".h" from iostream header. Well, I can't say the system(pause) worked, I killed it long before the movie finished. Val

Member Avatar for zandiago
0
104
Member Avatar for platotld

[QUOTE=platotld;480206]It was a port issue. The firewall port was wrong, it was somehow altered. Using KB306759 I went into the registry and seen that the port # had been changed and I just went into the firewall and set it to the number in the registry and away she went. …

Member Avatar for vmanes
0
153
Member Avatar for CookieMonster

You might get more help if you'd posted this to the C++ forum. As to storing face values based on your loop index, your if...else branching seems adequate. As you proceed, the Ace will be a problem in scoring - you will have to consider it as either a 1 …

Member Avatar for vmanes
0
67
Member Avatar for rishid

That is a O(n) - it runs in linear time. We don't consider how many lines in the file - the idea of O() notation is to generalize how the work grows in relation to the problem size. Whether on particular algorithm does something in three operations per step and …

Member Avatar for vmanes
0
74
Member Avatar for jadedreality

Something that will cut the tedium of switches based on letter input: [code] #include <cctype> //other header stuff char input; cin >> input; input = toupper( input ); //force value to upper case switch( input ) { case 'A': //stuff break; case 'B': //stuff /break //etc } [/code]

Member Avatar for vmanes
0
137
Member Avatar for ENG ISE student

What is the data type of 'repeat'? It should be a char for your while condition to work. Val

Member Avatar for ENG ISE student
0
97
Member Avatar for BlackNinja

There are several. Do a search on this site and you'll find this question has been asked and answered numerous times. See the last response in this thread: [url]http://www.daniweb.com/forums/thread82344.html[/url] Val

Member Avatar for vijayan121
0
72
Member Avatar for ENG ISE student

Please read the announcements at the top of this forum. You will most likely get help when you show you've tried to solve your assignment, then ask questions about specific problems you're having. Here's starting tip for you - use getline( ) specifying '#' as the delimiter, except when reading …

Member Avatar for ENG ISE student
0
114
Member Avatar for quickster12

It's hard to know what help to give, where to point you, without knowing how much you can accomplish on your own. Please make a start on the assignment and post it here, then we can figure out what aid you need. Val

Member Avatar for vmanes
0
92
Member Avatar for helixkod

No, you're not calling the sort function according to its parameters. [code] void selectionSort(int *array[], int size) [/code] However, it's the parameter that is wrong. Why do you have an asterisk in the array parameter? And why is minElem in the sort function a pointer? Val

Member Avatar for helixkod
0
126
Member Avatar for GrimJack

[QUOTE=zandiago;471692]lol...keep em coming....for me...don't diss my F-18...you'll be in big trouble.(look inder the wings)[/QUOTE] Umm, your F-18 is really an F-16. Count the vertical stabilizers. Val (retired USAF)

Member Avatar for GrimJack
0
273
Member Avatar for Slate2006

To do the average grade calculation for each of the students, your AvgGrade2 function should call AvgGrade1 for each element of the array. So, you need to pass to AvgGrad2 the array, the number of students, and the number of tests. Use a loop in the function, sending each student …

Member Avatar for Lerner
0
94
Member Avatar for The Dude

[QUOTE=bumsfeld;476072]Is this very important?[/QUOTE] It is if you plan on getting a cat. Girl cats generally won't soil your furniture as much, and won't embarrass you when they lay on their backs and get aroused. On the other hand, you'll want to buy good earplugs if you have a girl …

Member Avatar for vmanes
0
102
Member Avatar for mikeandike22

Just what is this section supposed to be doing? Walk through it by hand and analyze what it is REALLy doing. [code] while ( !input.eof( ) ) { input >> value; count++; for ( int i = 0; i < count; i++ ) { input >> med_val[i]; } } [/code] …

Member Avatar for mikeandike22
0
671
Member Avatar for kaly12

Many here will help, but no one will write it for you. Please post a copy of what you've done to solve the problem, and tell us where you feel you're having difficulty. Start with pencil and paper - outline the steps the program must take, then refine those to …

Member Avatar for ithelp
0
93
Member Avatar for ricnyx

When you do the [inlinecode]fin3 >> a >> b;[/inlinecode] after having read all the data in that file, the inputs fail, but the values in the a and b variables remain unchanged. The eof( ) does not halt the reading until you've actually tried to read past the end. Given …

Member Avatar for ricnyx
0
132
Member Avatar for deraj8

You're off to a right start on the reading,but you need to use a different method of stopping the loop, and getting next data. Your code: [code] indata>>StoreID; indata>>ProductsSold; for(int size=0; size<40; size++) { StoreID=Sales[size]; index = LinearSearch(StoreID, arraysize, ID); if (index<0) { ID[size]=StoreID; Sales[size]=ProductsSold; size++; } else Sales[size] += …

Member Avatar for vmanes
0
112
Member Avatar for lifei

Take a look at code snippet: [url]http://www.daniweb.com/code/snippet97.html[/url] which can play frequencies directly as MIDI output. Val

Member Avatar for vmanes
0
111
Member Avatar for tones1986

[code] int i = 0; inFile.read((char *)&personInfo[i], sizeof(Employee)); while (inFile) { inFile.read((char *)&personInfo[i], sizeof(Employee)); i++; } [/code] note that you read into position 0 of your array, then read into it again, overwriting the first record. Put the i++ as the first action in the loop body. Val

Member Avatar for vmanes
0
161
Member Avatar for picklesandmayo

[code] while (!cin.eof() || a != prod) [/code] will continue as long as the user has not hit ctrl-z OR has a wrong answer. try using AND remember that the modulus operator (%) will give results in the range 0-(divisor -1) - check your switches, and the values you are …

Member Avatar for vmanes
0
96
Member Avatar for blackslash13
Member Avatar for rogenie

Look at how you're doing the comparisons in binary search function. What's really being compared?

Member Avatar for WaltP
0
128
Member Avatar for juoyaf

Since you don't have any information beforehand telling you how many iterations the loop will go, a for loop is not a good choice here. As it's some condition that arises during the run, a while loop is the better choice, or even better, a do...while. [code] do { //read …

Member Avatar for vmanes
0
85
Member Avatar for The Dude
Member Avatar for hbk619
0
94
Member Avatar for The Dude

Follow the link: [url]http://www.childfriendly.org.au[/url] to find resources to help. Maybe if the link was interleaved with the scenes it would be more effective. And this is just one of several ads put out by that agency.

Member Avatar for bumsfeld
0
113
Member Avatar for The Dude

I quit at 186K, 5 levels. Closest I got to any single place was 43km Val:cool:

Member Avatar for bumsfeld
0
34
Member Avatar for jrice528

If it's the use of command line arguments that's giving you pause, here's a couple links with helpful information: [url]http://malun1.mala.bc.ca:8080/~wesselsd/csci161/notes/args.html[/url] [url]http://www.cprogramming.com/tutorial/lesson14.html[/url] Textbooks seem to generally ignore this topic. Val (Sorry, AD, it's early and I didn't see that your comments included a similar link.)

Member Avatar for vmanes
0
116
Member Avatar for hanmark

If your group is too Politically Correct, yes, it can vapor lock and get nothing done. Would you care to describe your problem more fully, so someone can give a serious answer?

Member Avatar for ithelp
0
83
Member Avatar for np2100

[QUOTE=np2100;475269]I know my code is bad however my problem is that after i average the grades i want to store that average as a variable. Ive tried doing (gradea + gradeb + gradec + graded + gradee + gradef)/6= average and cin>>average but i cant it doesnt work. Any alternatives??[/QUOTE] …

Member Avatar for np2100
0
301
Member Avatar for dise652

If that's your shopping list on the worst BF, I'd hate to see what you spend in a good year?!?!?! Looks like quite a few good deals there - laptops with more horsepower than last year's deals, at similar prices. Val (planning on sleeping in that morning. really late!)

Member Avatar for Lardmeister
0
85
Member Avatar for yashwanta

[QUOTE=Salem;474857] If you live in the northern hemisphere, you need to get one which spins clockwise, whereas if you live in the southern hemisphere, you need one which spins anticlockwise ;)[/QUOTE] That's been proven incorrect time and again. You can make your drives spin either direction in either hemisphere. On …

Member Avatar for Lardmeister
0
77
Member Avatar for MNDGAM

Why is the argument passed by reference? You are returning the result directly. Reference parameters in recursive functions are tricky things - every instance of the function may be modifying the same object in memory. And you cannot use the reference parameter in the expression [inlinecode] return F( n-1 )....[/inlinecode] …

Member Avatar for vmanes
0
104
Member Avatar for mrgreen108

Yes, you want to do a loop. Assuming you've read in text to a string, and you have the character at which you want to stop, you can either loop through the string displaying a character at a time till you find the stopping char or you run out of …

Member Avatar for vmanes
0
121
Member Avatar for ice_tea_lemon

You're trying to swim against the (file)stream. [code] ifstream income; income.open ("Income.txt", ios::in); ifstream fixed_expenses; fixed_expenses.open ("Fixed Expenses.txt", ios::in); ifstream variable_expenses; variable_expenses.open ("Variable Expenses.txt", ios::in); [/code] You are opening file handles of type ifstream, which are by default input handles. So, you don't need the "ios::in" mode parameters. But, you …

Member Avatar for Salem
0
111
Member Avatar for The Dude
Member Avatar for samaru

It's what I've used everywhere I've worked for 20 some years, going back to Win3.1. At home, I've got several major apps I use that are not available for other platforms. Then there's just plain inertia. Macs are looking more enticing. Wish there was a standalone box between the Mini …

Member Avatar for FragFighter
0
190
Member Avatar for cuddlerbes

[QUOTE=vishesh;474162]Take number as string. Also long int, long long etc etc may take number till 10 digits.[/QUOTE] long int (on most 32 bit systems, anyway) will not take full range of 10 digit numbers, as it's allocated just 4 bytes. long long int will be sufficient, handling full range of …

Member Avatar for vmanes
0
86
Member Avatar for ithelp

[QUOTE=bumsfeld;465728]Lardmeister, do you have an answer to everything? The Saudis and their royal family are our best friends![/QUOTE] They are not our best friends. They are not even friends. They are, at best, wary allies who really don't like us at all. Been there, seen that. Val

Member Avatar for MidiMagic
0
162
Member Avatar for dsuh06

You could read each input line with the getline( ) function. That throws away newlines when encountered. Assuming each input line ends with the newline immediately after the last nonwhitespace character, you will have to be sure to insert a space into your output before adding on the next input. …

Member Avatar for dsuh06
0
1K
Member Avatar for boyz

[QUOTE=ganbree;472817]But in case you don't have a book... [B]return[/B] can only be passed one value. However it could be an array if they are of the same type.[/QUOTE] That depends on what sort of "array". A locally declared array, such as [inlinecode] int ret_arr[10]; [/inlinecode] cannot be the return value, …

Member Avatar for vmanes
0
90
Member Avatar for jbstin

"void main() -- main() has NEVER been a void, always an int, see this" But I beg to differ a bit - once upon a time main( ) was a void function. Read K&R recently? The earliest C++ book I have, circa 1993, uses the form [code] main ( ) …

Member Avatar for vijayan121
0
226

The End.