2,827 Posted Topics

Member Avatar for iGuardian

Garbage in, garbage out. You can't test your standard deviation function until you fill it with actual data, which you are not doing anywhere. You have a file that you open called "stddev.dat". You open it in line 20 and you check to make sure it opened correctly in lines …

Member Avatar for iGuardian
0
368
Member Avatar for cwarn23

>> Any feedback on your reasons as to why you might give a negative response to a video titled "How to RTFM for Dummies"? It's sort of hard to speculate about why people didn't like your video since you didn't post it. >> Actually, youtube comments are just plain nasty …

Member Avatar for NicAx64
0
472
Member Avatar for GrimJack

>> But... What makes you think citizens would start killing people and owning sex-slaves because they have a bigger gun? They wouldn't, and nothing in AgileMind's argument implies he thinks they would. He's simply pointing out the fallacy of any argument along the lines of "Criminals get to do x, …

Member Avatar for pseudorandom21
0
468
Member Avatar for sknake

[QUOTE=BestJewSinceJC;1048444]The system is idiotic. Lets see how low we can get this post guys. -50?[/QUOTE] One person can't knock you 50 points on one post. However, one person CAN pick 50 random posts of yours from a year ago and downvote each of them as fast as he/she can click …

Member Avatar for pseudorandom21
2
964
Member Avatar for addision

Thank you for using code tags. You used them correctly. Regarding your question... [quote] how do I pass a value from my "deposit" variable up to my money::addchecking function? [/quote] you DO NOT pass "deposit". See line 15. "deposit" is declared as a class variable. That means no passing is …

Member Avatar for addision
0
138
Member Avatar for javaman2

Start with the driver. [code=JAVA] import java.util.Scanner; public class DeviationsDemo { public static void main(String[] args) { int n; Deviations deed = new Deviations(); Scanner keyboard = new Scanner(System.in); System.out.println("Enter length of the array."); n.standard(keyboard.nextInt()); double[] a = new double[15]; } }[/code] Line 11 makes no sense. n is an …

Member Avatar for stultuske
0
2K
Member Avatar for infantheartlyje

Lines 27 -30. The fstream open function takes const char*, not a string. You need to convert the string to a const char* using the c_str function from the string library. [quote] void open ( const char * filename, ios_base::openmode mode = ios_base::in | ios_base::out );[/quote] [url]http://www.cplusplus.com/reference/iostream/fstream/fstream/[/url] [url]http://www.cplusplus.com/reference/string/string/c_str/[/url] [code] FileHandler …

Member Avatar for raptr_dflo
0
175
Member Avatar for matt_570

[code] void printConsecutive(int array[], int number) { int largeAvg; largeAvg = (array[0] + array[1] + array[2]); for (int i = 3; i < number; i = i + 3){ if ( (array[i] + array[i++] + array[i = i + 2]) > largeAvg){ int j = i++; int k = i …

Member Avatar for pratik_ghulaxe
0
1K
Member Avatar for cwarn23

>> Time to start changing things! Some approaches of doing that... 1. Adjust your actual standard of life upwards to actualize your desired standard of life. (this may involve actual hard work or may not be possible depending on the dream). 2. Adjust your standard downward (i.e. stoicism, sort of. …

Member Avatar for Netcode
0
158
Member Avatar for dineshz

When, where, what, etc. More details are needed. Random characters how? What's the exact input file? What's the exact output? What's it supposed to be? Etc. Point to a line number. conio.h and gotoxy.h are problems. I for one can't run a program that uses them because I don't have …

Member Avatar for VernonDozier
0
603
Member Avatar for Zvjezdan23

Line 14... [code] string first_sphere[3];[/code] Array size is 3, so valid indexes are 0, 1, 2. Line 18... [code] getline(cin, first_sphere[3]);[/code] Index is 3. Again from above... Array size is 3, so valid indexes are 0, 1, 2. The array index must be less than the array size.

Member Avatar for mrnutty
0
329
Member Avatar for davidrgarber

Double posting is selfish. Show some respect for peoples' time and pick a forum and stick with it. You've already been helped there. Anyone on daniweb who helps you is likely going to give you the same advice. [url]http://www.codeguru.com/forum/showthread.php?p=2037720[/url]

Member Avatar for VernonDozier
0
286
Member Avatar for VernonDozier

Anyone else seeing this behavior? Post a response, someone responds, you respond back, they respond, etc., and you have a thread with, say, six posts. Life is good. Then look at the page (see screenshot)... ONE reply. Click on it and you get the whole thread with SIX replies (or …

Member Avatar for VernonDozier
0
212
Member Avatar for supersport

>> i have figured out how to do that, but it must be returned as a string and i cannot figure out how to do that... Seems to me that you'd just stick this line at the bottom of the markRuns function. [code] return answer; [/code] But looking at the …

Member Avatar for inthearmynow99
0
1K
Member Avatar for XodoX

Well, can you create a doubly linked list from something OTHER than a file? If not, then don't worry about the file. Learn about doubly linked lists. If you already know how to use a doubly linked list, but you don't know how to read from a file, then forget …

Member Avatar for EskayJoe
0
1K
Member Avatar for MonicaClare

I am a little confused. You don't have any StringBuffer objects in this code, do you? I don't see any. When I saw the thread title, I figured you had a StringBuffer object, but it wasn't working and you needed help debugging the code, but again, you don't have any …

Member Avatar for jade_1453
0
150
Member Avatar for sergent

[QUOTE=cwarn23;1662260]This thread is officially obsolete.[/QUOTE] Yes, by all means let's move on. God forbid we mourn anyone for more than 24 hours.

Member Avatar for AliTheChamp
0
330
Member Avatar for gotm

[QUOTE=gotm;908958]hey guys. OK so, I've been wondering this for a while now. my code is always so unnecessarily cluttered because I don't know how to do this, lol. say I have a set of private class variables: [code=java] private ArrayList row0 = new ArrayList<String>(); private ArrayList row1 = new ArrayList<String>(); …

Member Avatar for JamesCherrill
0
167
Member Avatar for GrimJack

[QUOTE=GrimJack;607991]Is the world becoming a Panopticon? Do you behave differently when you know there is a camera around? Anybody from the UK where cctv is omnipresent -- does the knowledge that you are under observation whenever you are out in 'the commons' affect how you behave? If you thought that …

Member Avatar for Netcode
0
601
Member Avatar for blackrobe

The first list has 3 elements, the second has 2 elements, the third has 2 elements, so there are 3 x 2 x 2 = 12 possibilities. Use a triple nested loop: [code] for (int i = 0; i < 3; i++) { for (int j = 0; j < …

Member Avatar for Mavericks
0
9K
Member Avatar for aero31aero

Ditto what AD said. [quote] Everytime I run this program and enter a new record, it gets terminated on these statements:[/quote] It'll terminate (I assume that means "crash") on one of the two statements. Your first step is to figure out which one. Divide by zero would make it crash …

Member Avatar for aero31aero
0
195
Member Avatar for Zssffssz

[QUOTE=Zssffssz;] I want to make a console app that does the XOR thing [/QUOTE] What's the "XOR thing"? There are a whole bunch of encryption techniques which use XORing, but it's not the whole algorithm. [QUOTE=Zssffssz;] I heard about using the simple ifstream and ofstream [/QUOTE] If you're looking for …

Member Avatar for doug65536
0
232
Member Avatar for meli123

>> hey alll..I posted earlier on needing help for a code on input #..base..print decimal form. You have to link it. What's the problem statement? Usually there is some example input and example output. >> "input #..base..print decimal" I'm guessing this means the user types in a number and the …

Member Avatar for VernonDozier
0
154
Member Avatar for mrrko

[QUOTE=mrrko;689147][I]Negotiating a consumer loan is not always straightforward. One form of loan is the discount installment loan, which works as follows. Suppose a loan has a face value of $1,000, the interest rate is 15%, and the duration is 18 months. The interest is computed by multiplying the face value …

Member Avatar for Bummpy 1
0
1K
Member Avatar for omeralper

[code=JAVA] public class Main { public static void main(String[] args) { //this program requires two arguments on the command line if (args.length == 2) { //convert strings to numbers float a = (Float.valueOf(args[0]) ).floatValue(); float b = (Float.valueOf(args[1]) ).floatValue(); //do some arithmetic System.out.println("a + b = " + (a + …

Member Avatar for hfx642
0
355
Member Avatar for almostbob

>> Yu haf no idr how fablus I feel rite now. Enjoy it while it lasts. My guess is you won't be feeling nearly as good tomorrow! >> all those things went in to your stomach? The question is how long it all stayed there.

Member Avatar for AndrewDJ
4
160
Member Avatar for c++ prog

How/where are x and y used? Do they represent data? So you want to be able to delete or insert a node somewhere in the middle or end of the list? You want something like this for a prototype? [code] void DeleteNode (int n); // deletes nth node in the …

Member Avatar for Cross213
0
116
Member Avatar for cobberas

>> Can it really "teach you the essential tools to get started on your career path" as a web designer/developer? IMO "web designer" and "web developer" are two separate jobs requiring two separate, though overlapping skillsets. "Web Developer" would involve more of the back-end coding. The "CSS" and "Flash Animation" …

Member Avatar for Dani
0
228
Member Avatar for DoubleZ

[code] do { remainder = square %10; square = square / 10; } while (square>1); [/code] Input --> number = 13 square = 169 digit = 6 This should pass? Yes? 6 is a digit in 169. Think about how you would do this on paper. 169 Number of 6's …

Member Avatar for DoubleZ
0
2K
Member Avatar for hdan

[QUOTE=hdan;662695]I know the variable address and I need more tutorials... as is said I'm not here for codes... I'm here for functions and what they do, and finally that they have some LITTLE spoiler for the trainer.[/QUOTE] What trainer? What variable? What game? Tutorials on what subject? What do these …

Member Avatar for chochang262
0
901
Member Avatar for frogboy77

[quote] So what is "badly wrong"? Unlike the riots of 1981, these are not fundamentally about race or police heavy handedness. It is not some political grievance that rioters have in common, but rather the desire for a new pair of designer trainers and flat-screen TV. [/quote] Nothing new. The …

Member Avatar for pseudorandom21
0
425
Member Avatar for MooGeek

The professor is right. An algorithm is a generic process. The line between pseudocode and real code can be a blurry one, but I think you crossed it. I doubt I would have given you a zero, but I wouldn't have given you full credit either. Presumably an algorithm would …

Member Avatar for reactivated
0
383
Member Avatar for jingda

>> Apparently that doesn't work because I've never seen even one tutorial. I don't even see a link for tutorials Click on any category and if any tutorials exist for the category, there's a tab to click. For example there are 12 is software development. Click on the C or …

Member Avatar for ggeoff
0
555
Member Avatar for Roxsy3392

>> Maybe we should return to those days. I believe the whole appeals process was created to correct for all the abuses of that era. Hell, you don't even need to go back that far. Look at Julius and Ethel Rosenberg. We're STILL arguing about whether they were both guilty. …

Member Avatar for jwenting
0
2K
Member Avatar for RideFire

Ignoring the "prime number" aspect of the question and zoning in on the part you seem to be stuck on... [code] while (testnumber < 100 [COLOR="Red"]how do I make this defined by the user?[/COLOR]) [/code] if you don't want 100 hard-coded and instead want it as a user entry, create …

Member Avatar for RideFire
0
2K
Member Avatar for Netcode

Go to the bank and take out a bunch of loans that wouldn't be due until after the world ended. Go to the doctor, find out all the ways that I can abuse my body which would be fun now, but where I wouldn't need to suffer any consequences till …

Member Avatar for M_alloc
-1
216
Member Avatar for Heioingi

I got a little confused trying to follow the logic of the code. floatHour equals 4.5, so line 15 is true, so we'll execute lines 16 to 18. carryOver is 4.5 times 100 = 450. Mod carryOver by 100 and we get 450 % 100 = 50. intHour = 4.5 …

Member Avatar for Heioingi
0
1K
Member Avatar for deanbrogada

DotNet and CLI isn't needed. This isn't anything plain old C++ can't handle. It's a string manipulation exercise. You need to be able to... [LIST=1] [*]Find characters within strings. [*]Take apart strings. [*]Conacatenate strings. [/LIST] [url]http://www.cplusplus.com/reference/string/string/[/url] The string library has all you need. That said, on a non-programming note, it …

Member Avatar for Onlineshade
-1
189
Member Avatar for sergent

I think you should decide whether you want to be taken seriously or not. You make it easy for people to write you off as an immature kid when you write stuff like this... [url]http://www.daniweb.com/community-center/geeks-lounge/threads/373466/page3[/url] [quote] I support National Socialism. [/quote] Real opinion? Just trying to get a rise out …

Member Avatar for Paaat
-5
2K
Member Avatar for rjcenteno

Figure out what have. Figure out what you need. Figure out what you need to store. Decide what assumptions you can make. You have a different number of tokens required for each shape. Think of it as a key-value pair, where the value is the NUMBER of values. So set …

Member Avatar for raptr_dflo
0
155
Member Avatar for surajdevesan

You need to get rid of the "div" tags. It's hard to read otherwise. Both of these functions have error flags associated with them and you can find out what the exact error is. [quote] Return value If the file is successfully renamed, a zero value is returned. On failure, …

Member Avatar for VernonDozier
0
5K
Member Avatar for clyo cleopas

Your problem is one or more of the following going wrong. [LIST=1] [*]Input doesn't work. [*]Calculation doesn't work. [*]Parameter passing doesn't work. [*]Something else. [/LIST] Figure out which one it (or more) it is. Then tackle it. A good start would be to add a few debug lines at the …

Member Avatar for raptr_dflo
0
1K
Member Avatar for seamus400

Why did you comment out line 23? Seems like lines 32 and 33 are backwards. You should test if it's open, then if it's open, close it. And it never hurts to clear the bits too. I'm sure this is overkill, but I imagine it'll work. Experiment around. [code] #include …

Member Avatar for seamus400
0
4K
Member Avatar for clyo cleopas

>> this program does not interact with main function in a proper way [LIST=1] [*]What does the program actually do? [*]What does the program do? [*]How do these differ? (i.e. what is the precise problem?) [/LIST] I'm guessing the problem is here? [code] void inputAndValidate (int entranceHour,int exitHour,int entranceMinutes,int exitMinutes) …

Member Avatar for sfuo
0
114
Member Avatar for clyo cleopas

Close. [noparse] [code] // paste code here [/code] [/noparse] [code] //A c++ program that calculate and print parking charges #include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 2; const int numOfMinsPerHour = 60; void inputAndValidate(int,int,int,int); void convertToMinutes(int&,int&,int&,int&); …

Member Avatar for VernonDozier
0
189
Member Avatar for ksm092

The code looks okay except that you have a local variable shadowing a member variable. I imagine you want to delete line 5. Sounds like you're planning on deleting that line anyway. Seems like a good idea. Regardless, that should not cause the problem you're getting. Line 21 should still …

Member Avatar for VernonDozier
0
250
Member Avatar for ben1996123

[quote] C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes in separate files\src\testClassFile.cpp|1|error: testClassFile.h: No such file or directory| [/quote] It can't find this file, so it can't compile and link. You need to add that file to the project in Code Blocks. Right click on the project and click "Add Files", then maneuver …

Member Avatar for ben1996123
0
1K
Member Avatar for Bobbysmile

[quote] #define USER_NAME x is a problem [/quote] Right, but WHAT is the problem? You should get an exact error message from the compiler and/or linker. Not sure what you mean by a main "group". You need a main function and you need EXACTLY ONE main function. So no, you …

Member Avatar for Bobbysmile
-1
501
Member Avatar for HASHMI007

[quote] Any one can tel me the logic of Transaction of Money from one account to Another Account [/quote] Way too vague. What "logic" do you want explained? How banking works? How the code works? If the latter, there are several directions one can go from that. Overall logic and …

Member Avatar for Süspeñce
0
450
Member Avatar for ben1996123

The function declaration and the function don't match. The function takes a parameter, but the function declaration says it doesn't. Copy line 30 to line 6. Lines 6, 16, and 30 need to match each other as far as the parameters the function takes.

Member Avatar for VernonDozier
0
109

The End.