5,676 Posted Topics
Re: [QUOTE=rigoalhn;]Hey i guuys, i researched for this topic and there were some close titles to this but none exactly helped me.[/QUOTE] I helped with (or at least followed) many of the prime number programs here. If memory serves, and it does, almost all will help you. You have basically 2 … | |
Re: I read the words after I wrote them and they just weren't helping :p Is the button on the left EDIT or EDIT/DELETE for you? ![]() | |
Re: Java, python, perl, c, c++, algol, pascal, basic, snobol, lisp, pl/1, cobol, bliss, etc, etc... | |
Re: It also helps to comment your own code. Then you can use it to test itself. | |
Re: [QUOTE=timkunce;1120246]I am only allowed to use int, unsigned int and float. Must be accurate to the 7th significant digit. Currently I overflow 'float top' at an x value greater than 13. Thank you for your time.[/QUOTE] Meaning? What were you expecting as an answer? | |
Re: You are making it so hard! The instructions are: [QUOTE=faraz ahmad;]Write a program that takes integer input from the user and store into the array dynamically allocated each time a new element is added. [/QUOTE] Note the wording: "[I]store into [B]the[/B] array dynamically allocated [/I]". Allocate a buffer of sufficient … | |
Re: See [url=http://www.gidnetwork.com/b-56.html]this[/url], [url=http://www.gidnetwork.com/b-62.html]this[/url], and [url=http://www.gidnetwork.com/b-62.html]this[/url]. Oh [url=http://www.gidnetwork.com/b-43.html]this, too[/url]. | |
Re: You can't open and close a file between each write and expect to keep the data being overwritten. Move the write outside the IF. | |
Re: Food for thought: How many cards in a deck? How many cards in a suit? How many cards of a rank? (same pips) Can you see a correlation between all these numbers? Are the following mathematical operators useful in calculating these numbers?[B] * / % [/B] You can make the … | |
Re: [QUOTE=fr0st003;]I read through all previous post regarding quicksort on a linked list. The trouble I am having is using a random element, it seems all the other post are using the first or middle element where I want to use a random element for the pivot.[/QUOTE] You may want to, … | |
Re: Just make the password a character array. | |
Re: [QUOTE=deceptikon;1762747]The site hasn't been skinned yet, so it doesn't look like much. We don't really want to show off the raw site as folks have a tendency to focus on how it looks and ignore how it works.[/QUOTE] Not the moderators (at least most of us are savvy enough to … | |
Re: 1. How important do you consider computer security? Quite important 2. Do you use Anti‐virus/Anti‐spyware software? [INDENT]i. When was the last time you updated this software?[/INDENT] [INDENT]ii. When was the last time you complete a full scan of your system?[/INDENT] This month. 3. which operating system do you consider most … | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: STOP YELLING AT US! WE'RE SORRY! WE WON'T DO IT AGAIN!!!! Read the friggin' Member Rules! And this: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, … | |
Re: Create a loop. If they enter an invalid value, stay in the loop. If they enter a valid value, exit the loop. | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: Uninitialized variables Program runs in the same memory Programmer did something wrong These are my guesses... | |
Re: I don't understand the need to break the input into words. Just make sure the first letter is capitalized and set all other letters to lower case. Doing it word by word is meaningless and makes the job more complex. Go through the sentence and fix capitalization. Go through a … | |
Re: Save the output from [B]a.cpp[/B] in a file. [B]b.cpp[/B] reads the file. | |
Re: [QUOTE=IwalkAlone;320668]I am not allowed to use islapha function since its not been taught yet. [/QUOTE] Each character has a numerical value. Therefore you can simply compare characters. For example, to see if the character [I]ch[/I] is a digit, you can use: [INLINECODE]if (ch >= '0' && ch <= '9')[/INLINECODE] If … | |
Re: [url=http://lmgtfy.com/?q=selection+sort]Try This[/url] | |
Re: [QUOTE=belle_tenor;]I am having trouble with a couple of things: first, using a function and/or loop to keep track of rolls to display them at the end of the program. I think I should use a static int variable but I am not sure how to initiate this using functions (which … | |
Re: [QUOTE=caltech;]No, I realize that much. I can't organize it in my head. I need this spelled out for me, more than that. Thanks though. Couldn't have guessed, right? I need details.[/QUOTE] That's what pen and paper are for. To organize it so you don't need to keep it in your … | |
Re: Keep a counter of how many houses you placed in the array. | |
Re: Try this: [CODE] Initialize all values as 'prime'. Outer loop [B]val1[/B] from 2 to [I]whatever[/I] Inner loop [B]val2[/B] from [B]val1[/B]*2 by steps of [B]val1[/B] // skips the number itself ... sets value to 'not prime' // ... and sets each multiple thereafter [/CODE] | |
Re: [QUOTE=Graphix;]I've tried adjusting the modus for file reading/writing, but it did not solve the problem: the file copy is still stopped after 705 bytes. [/quote] Then you didn't fix the problem properly :icon_wink: [QUOTE=Graphix;]If I understand correctly, the difference in speed between fread/fwrite and getc/putc is the same? [/quote] You … | |
Re: Start the number at 1. Every time you input a patient, add 1 to it. | |
Re: Get rid of that complex FOR statement. Doing 2 [iCODE]fgets()[/iCODE] in a FOR statement is a recipe for disaster. Keep your code simple. Pull those 2 reads out and put them in the loop itself. | |
Re: You are all wrong -- except for [B]deceptikon[/B]. The value cannot be determined with any surety. [url=http://c-faq.com/expr/evalorder2.html]See this[/url] | |
Re: [CODE]if (isalpha(charValue)) { // charValue is an alpha } else { // charValue is not an alpha } [/CODE] Returns TRUE if [I]charValue[/I] is A-Z or a-z Returns FALSE if not. | |
Re: [QUOTE=faisal08005337A;]sci@phy, did you really understand the problem?the answers you have written is vague and may be equal to knowledge of a child in programming. If you can not answer properly, do not answer it just to show that you are an intellectual.[/QUOTE] Is there a reason you resurrected a 4-year … | |
Re: In other words, simplistically, it's a way to define what ==, <, >, etc are meant to be for a class that you define yourself. Example, you have a class of CAR which contains Make Model Year Price You can define operator= to mean: Same Make Same Year Price is … | |
Re: Always use { } to make your code readable and consistent. This then no longer will be a problem. | |
Re: Because y is modified twice. [url=http://c-faq.com/expr/seqpoints.html]See this[/url]. | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: Completely depends on what's wrong. This will help... [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post … | |
Re: [iCODE]out_stream<< next<< endl;[/iCODE] -- what does [B]endl[/B] do? | |
Re: [QUOTE=radiat;]But what is the point of dynamic memory for a single type? [/QUOTE] Exactly... For a single type, it's a waste to use dynamic memory. I can't think of any reason why one would need to dynamically create an [B]int[/B] or [B]float[/B]. [QUOTE=radiat;]Do you mean if i were to declare … | |
Re: My quess is it depends on what N and M are... [CODE]matrix[i*N+j] = (double) array[i+j]; ----^--- [/CODE] Why? Aren't they both doubles? | |
Re: First thing's first. As mentioned, use proper FORMATTING. [url=http://www.gidnetwork.com/b-38.html]See this[/url]. Without consistent formatting, trying to follow and understand someone else's program is difficult. If you need help, help us, too. | |
Re: Which date? Creation? Last Write? Last Access? All seem important to me, albeit to differing degrees. And what are you considering a header? | |
Re: 1) [url=http://www.gidnetwork.com/b-38.html]Format[/url] your code 2) [url=http://www.gidnetwork.com/b-66.html]main()[/url] is not a void 3) Don't use [I]conio.h[/I] because it's non-standard and only a couple compilers have it defined 4) The [B].h[/B] version of C++ headers have been replaced [I]years[/I] ago | |
Re: 1) USE CODE TAGS! 2) [url=http://www.gidnetwork.com/b-38.html]Format[/url] your code. Almost [B]all[/B] errors like this can be avoided by proper formatting. 3) Never [I]tell[/I] us what the error says, post it verbatim (copy/paste) | |
Re: [QUOTE=MrNo;]So basically I'm a little bit confused. I believe the logic of my program is correct; file pointer is declared, and I do have a character to store my array, it reads the file, and counts all the words pending a space in front/between/etc. Basically the program should ask the … | |
Re: Sure. You probably changed something and broke it. Hope that helped. | |
Re: Get rid of all the hex and tell us [I]exactly[/I] what you want... using ASCII. | |
Re: 1) Your switch function has no value at all for [B]rank[/B] 2) You return a nonexistent variable named [B]rankPay[/B] Think it through again. What values do you have available in the function? What values do you need to have for the calculations? If you don't have them in the function, … |
The End.