244 Posted Topics

Member Avatar for dahaker

i think if you are going to have more than one statement after an [B]if[/B] then curly braces {} should be used(i.e line 19 to line 20, 23 to 24 and 27 to 28). I'm also a bit wary of the return main line.

Member Avatar for dahaker
0
3K
Member Avatar for visom
Member Avatar for visom
0
3K
Member Avatar for blee93

Surely the method mentioned by the OP would show sum to be 15. This is not is what you are looking for(at least i think). stringstream may be the way to go.

Member Avatar for frogboy77
0
209
Member Avatar for aqnie

1. use code tags. 2. if you are being asked for pseudocode then i am guessing your prof doesn't think you are ready for the actual code yet. 3. is this your code? 4. google. edit: it just appeared in code tags 3. i.e can you explain what the code …

Member Avatar for aqnie
0
120
Member Avatar for WASDted
Member Avatar for Ancient Dragon
Member Avatar for ashrafu1
Member Avatar for Sherry.K

[URL="http://en.wikipedia.org/wiki/Compound_interest"]http://en.wikipedia.org/wiki/Compound_interest[/URL]

Member Avatar for VernonDozier
-4
599
Member Avatar for Michael_Knight

Lady Astor: 'If you were my husband, I'd poison your coffee!' Churchill: 'My dear, if you were my wife I'd drink it.'

Member Avatar for happygeek
0
1K
Member Avatar for honeythigh

1) yes, but be prepared for a very steep learning curve. 2) as far as i am aware a large percentage of modern games are written in c++ (but remember writing a game may not be as much fun as you think it will be, i.e lots of time writing …

Member Avatar for honeythigh
0
411
Member Avatar for vegaseat
Member Avatar for NicAx64
Member Avatar for determine

ok just guesses but line 14 why? do while signal !='q' initially what value does signal have?

Member Avatar for determine
0
415
Member Avatar for determine
Member Avatar for pete_g

can you use vectors? that would be my first port of call. then either use sort or write (what i think is called) a bubblesort.

Member Avatar for pete_g
0
173
Member Avatar for spoonlicker

[QUOTE]If I have seen further it is only by standing on the shoulders of giants.[/QUOTE] Sir Isaac Newton

Member Avatar for katokato
-1
695
Member Avatar for jake1496
Member Avatar for jwill222

That's a big ask. My suggestion would be to run the program with extra cout lines to find where the problem is occurring then post the smaller piece of code(that isn't working) for people to help you with. There are some here who may slog through ~250 lines, but not …

Member Avatar for frogboy77
0
263
Member Avatar for bumsfeld
Member Avatar for diafol
1
162
Member Avatar for Rickay
Member Avatar for Abelville

As it says you have a double function so it is expecting a double value to be returned. Plus you seem to be missing some function definitions.

Member Avatar for Abelville
0
193
Member Avatar for butchoy
Member Avatar for DubyStev
Member Avatar for dstaner

perhaps you should get together with biancaW here; [URL="http://www.daniweb.com/forums/thread344087.html"]http://www.daniweb.com/forums/thread344087.html[/URL]

Member Avatar for happyherbivore
0
746
Member Avatar for Climber Ty
Member Avatar for somshridhar

[QUOTE]Dev-C++ is [B]updated frequently [/B]and includes all of the library's you will probably ever use (using the new standards) [/QUOTE] [URL="http://en.wikipedia.org/wiki/Dev-C%2B%2B"]http://en.wikipedia.org/wiki/Dev-C%2B%2B[/URL]

Member Avatar for kernel>panic
0
4K
Member Avatar for flasp
Member Avatar for kri_prasad2000
0
171
Member Avatar for happygeek

cure step 1 - Find pint glass. step 2 - Fill with beer. step 3 - Drink contents of glass. step 4 - GOTO step 2. this should fix it.

Member Avatar for mrnutty
3
175
Member Avatar for mikecolistro

I would suggest posting less code and a specific question about what you are looking for.

Member Avatar for ravenous
0
168
Member Avatar for Crutoy

[CODE]a=4596; b=(((a/100)%10)+((a/1000)*10)+((a%10)*100)+(((a/10)%10)*1000));[/CODE] may work but arrays or strings would be easier.

Member Avatar for Crutoy
0
88
Member Avatar for frogboy77

[CODE]bool is_prime(int a) { if(a==1){return false;} if(a<4){return true;} if(a%2==0){return false;} if(a<9){return true;} if(a%3==0){return false;} int i; for(i=5;(i*i)<=a;i+=6) { if(a%i==0){return false;} if(a%(i+2)==0){return false;} } return true; } [/CODE] critique welcome.

Member Avatar for frogboy77
0
119
Member Avatar for XodoX

If you want any help (and you do from the above poster) then an amount of effort shown really is required.

Member Avatar for XodoX
0
202
Member Avatar for dadam88

i believe this line [CODE]while (pick != 'r' || pick != 'g' || pick != 'b');[/CODE] should be [CODE]while (pick != 'r' && pick != 'g' && pick != 'b');[/CODE]

Member Avatar for frogboy77
0
437
Member Avatar for thelostboy

If room 5 doesn't exist the home may smell rather "funky". Lighting would be the least of your problems.

Member Avatar for thelostboy
0
146
Member Avatar for Crutoy

would this do it? [CODE]if(iWhole/10000==iWhole%10&&(iWhole/1000)%10==(iWhole/10)%10){is_pal=true;} else{is_pal=false;}[/CODE]

Member Avatar for frogboy77
0
117
Member Avatar for itsvineet
Re: c++

[URL="http://http://www.cprogramming.com/begin.html"]http://http://www.cprogramming.com/begin.html[/URL]

Member Avatar for frogboy77
-1
32
Member Avatar for folwea

see this [URL="http://www.daniweb.com/forums/thread78223.html"]http://www.daniweb.com/forums/thread78223.html[/URL] particularly point 4.

Member Avatar for mrnutty
0
130
Member Avatar for AmerJamil
Member Avatar for stevanity
Member Avatar for tech291083

1,132,345,679 exactly at time of posting. P.S my wife's computer just blew up so subtract 1.

Member Avatar for MosaicFuneral
0
278
Member Avatar for MooGeek
Member Avatar for AmerJamil

see this thread [URL="http://www.daniweb.com/forums/thread318047.html"]http://www.daniweb.com/forums/thread318047.html[/URL]

Member Avatar for Ancient Dragon
0
174
Member Avatar for gregorynoob
Member Avatar for jlianne18

don't know of a clever way but using 2 arrays would work. read into array1 then into array2 then have a loop which adds the value in each part of array2 to each part of array1 then output array1.

Member Avatar for Saith
0
203
Member Avatar for sanjith123456

[QUOTE]answer immediately please [/QUOTE] strange phrase. what seems to be an order followed by a plea????

Member Avatar for frogboy77
-2
104
Member Avatar for once janister
Member Avatar for Ancient Dragon
0
92
Member Avatar for airerdem
Member Avatar for htowa

You may recieve more help if you clearly state your problem. i.e what do you expect your program to do and what is it doing wrong. P.S USE CODE TAGS.

Member Avatar for frogboy77
0
154
Member Avatar for mrcpp

Am just a newb so this may be a stupid question, but i don't understand line 58 [CODE]for (int b = -999; b < 1000; b = primes[index++])[/CODE] why not [CODE]for (int b = -999; b < 1000; b++)[/CODE] I've already done this but having looked at my code i'm …

Member Avatar for mrcpp
0
310
Member Avatar for dynamyt3
Member Avatar for dynamyt3
0
1K

The End.