5,676 Posted Topics

Member Avatar for ohsevenfiveoh
Member Avatar for coolkid1093

Your basic problem is if you don't know how to use something, you can't program it. Any algorithm you try to use in a program you need to understand. Sit down with paper, pencil, and a good description of the principle and work out how it operates. Be sure to …

Member Avatar for geethasree
0
121
Member Avatar for nerdygirl118

Because when you enter a character, rather than checking if the character is a vowel first you enter a loop. Then you check if it's a vowel for each and every letter in the puzzle. So, why enter the loop if the character entered is wrong?

Member Avatar for WaltP
0
233
Member Avatar for ritesh2190

Of course you need help. Isn't that obvious? But [I]you[/I] need to give a very specific set of guidelines about [I]exactly[/I] what you need. What "algorithms"? Based on your almost description above, check each character input and create variables for [iCODE]num1[/iCODE], [iCODE]num2[/iCODE], and [iCODE]operation[/iCODE]. Then test the operation and perform …

Member Avatar for Anuradha Mandal
-1
4K
Member Avatar for gahhon

I don't speak alien language. Also, without knowing what went wrong (you didn't explain the problem at all) what can we say? Maybe you should try reading one field and see if that works. If it does, read one more field. Keep adding until one full line is read.

Member Avatar for gahhon
-1
118
Member Avatar for baconswife

You know you can't define a function within another function, don't you? If you properly [url=http://www.gidnetwork.com/b-38.html]format your code[/url], the error will jump out at you immediately.

Member Avatar for VernonDozier
0
328
Member Avatar for YuriR

What's the value of [B]CreditDebit[/B] at the beginning of the [iCODE]while[/iCODE] statement?

Member Avatar for WaltP
0
127
Member Avatar for digan

Without even looking back I remember someone pointing out that you are destroying your loop counter [B]a[/B], so naturally the outer loop is broken...

Member Avatar for Anuradha Mandal
0
2K
Member Avatar for triumphost

Because a letter cannot be put into an integer so the read fails. When you loop back, the letter is still there, so the read fails. When you loop back, the letter is still there, so the read fails. When you loop back, .... Why do you need an actual …

Member Avatar for WaltP
0
184
Member Avatar for Lanor

Depends on what you need help with. Care to tell us what's going wrong?

Member Avatar for WaltP
0
100
Member Avatar for BLUEC0RE

Strings and character arrays cannot be typecast as values. They can only be converted. Look up string to number conversion techniques.

Member Avatar for BLUEC0RE
0
71
Member Avatar for vnorbi

Look at [iCODE]kbhit()[/iCODE]. With that, [iCODE]getch()[/iCODE], and a timer you can do what you need.

Member Avatar for WaltP
0
232
Member Avatar for The_Prince

You've got the idea. Read the line. Find ". Start copying until you see another ". Find next ". Copy again until...

Member Avatar for WaltP
0
222
Member Avatar for ayetar
Member Avatar for AndreRet
0
128
Member Avatar for prestonprice57

Based on the code, it doesn't compile. Either explain the real problem or post the correct code. You can't 'skip' a line. Just read it and ignore what you read.

Member Avatar for WaltP
0
95
Member Avatar for jalenamichelle

Care to elaborate, or do you really want us to search through 200 lines of code not knowing what we're looking for? When asking for help, details are important.

Member Avatar for WaltP
0
119
Member Avatar for newCoder1545

Create two counters. First counts the rolls. Assuming heads, second gets set to 0 on each tail, incremented by 1 on each head. When second matches the number entered, first counter is number of rolls it took.

Member Avatar for WaltP
0
142
Member Avatar for nehru1947

Help with what? When asking for aid isn't it a good idea to describe the problem? We ain't the psychic programmers...

Member Avatar for WaltP
0
118
Member Avatar for ak_2005

BGI graphics was designed for earlier Borland compilers and won't work with 5.0+. So you have to rewrite the output portions of the program to remove the screen manipulation. Or you can find a graphics package you like and rewrite the output sections.

Member Avatar for Ancient Dragon
0
2K
Member Avatar for Armistice

It would help if you'd describe the problem. Getting stuck is not an explanation.

Member Avatar for Armistice
0
155
Member Avatar for lisvonj

[I]orderNumber [/I] is a char variable so it's value will be '1', '2', ... '9', not 1, 2, ... 9. If you need it to become an integer, subtract '0' and it will be correct.

Member Avatar for lisvonj
0
145
Member Avatar for Sam56

[QUOTE=Sam56] How would one properly format the block of code with only one cout? I think it has something to do with the semicolons? Any help here?[/QUOTE] By using CODE Tags :icon_twisted: Since semi's [I]end [/I]a statement, don't use them: [CODE] cout <<"hello" <<"how ya doin?" <<"goodbye."; [/CODE]

Member Avatar for hiddepolen
0
87
Member Avatar for cwarn23
Member Avatar for cwarn23
0
123
Member Avatar for ana12
Member Avatar for Ancient Dragon

I saw him a couple times live. I hear when his brother took over the show it wasn't quite as good although I never saw him. Trivia question: What is Gallagher's first name?

Member Avatar for dexter737
0
164
Member Avatar for cwarn23
Member Avatar for dexter737
0
203
Member Avatar for ana12

Not really. By it's very nature the food in the US is only mediocre on the health level in the first place. Overused land makes the nutrients and vitamins in vegetation low. By the time you get the veggies home from the market, most of the nutrition has leeched out …

Member Avatar for dexter737
-5
219
Member Avatar for garu525

Don't be so vague. Tell us exactly what's happening, not a generic "it doesn't work"

Member Avatar for WaltP
0
172
Member Avatar for kuchick32

Two answers, since your description leaves too much out so it's hard to understand your problem: 1) Since the movie information should go into an array of structures, you don't need any spaces between anything. 2) [iCODE]cout << " ";[/iCODE] And please [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. It's very hard to follow.

Member Avatar for jonsca
0
128
Member Avatar for Lando_

That's because you're breaking out of the loop after 16 characters. Instead, when you hit 16 1) reset the character counter 2) output the ENDL

Member Avatar for Lando_
0
1K
Member Avatar for MarounMaroun

First, your open is fine. [B]Adak[/B], he's using [ICODE]argv[/ICODE] to open the data file. Second, [B]sree_ec[/B] is correct. Third, when you use [ICODE]fgets()[/ICODE] to read 2 characters, the array must be of size 3. Remember (or look it up), [ICODE]fgets()[/ICODE] always adds an ending \0 and reads length-1 characters.

Member Avatar for sree_ec
0
148
Member Avatar for logicmonster

What's the formula for a cosecant? Why would they need to add a special function when you can easily use the definition formula?

Member Avatar for WaltP
0
61
Member Avatar for boss the robo
Member Avatar for eagles39
Member Avatar for Taywin
0
2K
Member Avatar for Meterior

1) Use CODE Tags 2) Format your code -- [url=http://www.gidnetwork.com/b-38.html]see this[/url] 3) [ICODE]main()[/ICODE] is not a void function -- [url=http://www.gidnetwork.com/b-66.html]see this[/url] 4) Execute your loop with pencil and paper to see what it's doing. Concentrate on the IF statement as you do.

Member Avatar for Meterior
0
94
Member Avatar for tauqeerahmed
Member Avatar for tkud
-1
60
Member Avatar for merse
Member Avatar for merse
0
372
Member Avatar for anthonys1mom

Since we aren't in you head, it's really hard for us to know where you're going. The only thing I can really tell you is your set functions should not input values. They should only set the private var with the value passed into the set-functions. Do the input in …

Member Avatar for Lerner
0
17K
Member Avatar for tech9x

Use [iCODE].rfind()[/iCODE] to search for the last space. [iCODE].rfind()[/iCODE] starts searching from the end of the string.

Member Avatar for WaltP
0
118
Member Avatar for kapilsolanki84

I wouldn't put it in that pattern. I'd format the code so it can be read by others.

Member Avatar for WaltP
-1
143
Member Avatar for Isimanica

The C++ Standard requires [iCODE]main()[/iCODE] to be [B]int[/B]. [B]void[/B] is just plain wrong.

Member Avatar for stokes1900
0
97
Member Avatar for tech9x
Member Avatar for WildBamaBoy

It says the error is in main on line 61. Might be a good idea to show us that line. Also [iCODE]string filename = Work.Title += ".txt";[/iCODE] should be [iCODE]string filename = Work.Title + ".txt";[/iCODE] I believe. I doubt you want to change [I]Work.Title[/I]

Member Avatar for WaltP
0
358
Member Avatar for tutun01111

Answering a C question with C++ is worthless. And using gets() and getch() is so wrong it's close to criminal. And do I really need to mention CODE Tags? The Member Rules are quite clear...

Member Avatar for Caeon
-2
96
Member Avatar for skiabox

[QUOTE=skiabox;]This is a solution but it does not work at all times and I can't find a logical flow in the code. Any ideas?[/QUOTE] Output key values during the execution to see if the program is behaving as you think it is. Try to pinpoint the area you have the …

Member Avatar for WaltP
0
152
Member Avatar for therobot

Since the lines in question are 52 and 256, and you posted only 40 lines, it's impossible to tell.

Member Avatar for therobot
0
2K
Member Avatar for gastonci

It just doesn't work? Then you did it wrong. When asking for help, be specific. What [B]does[/B] it do instead? And try to pinpoint [I]where[/I] the problem might be. Did you add output statements to see if important steps of the process have done their job correctly?

Member Avatar for gastonci
0
201
Member Avatar for urbangeek
Member Avatar for urbangeek
0
301
Member Avatar for heidik

Start by reading the first file and displaying the line Next, search for the "CCD" Then copy the rest of the line to another string Now display that new string to be sure you extracted it correctly Repeat until you get to the end of the file.

Member Avatar for vijayan121
0
135
Member Avatar for Rajdarji

Because floating point numbers are approximations. Digital values cannot represent real numbers exactly. Search the web for explanations of how they work.

Member Avatar for invisal
0
127

The End.