5,676 Posted Topics
Re: Confused with what? Is the [I]saleamount[/I] equal to the GNP? Does it crash your computer? Does it make bad coffee? | |
Re: Biggest difference is [ICODE]tolower()[/ICODE] is a standard function and [ICODE]strlwr()[/ICODE] is specific to certain compilers, non standard. [ICODE]tolower()[/ICODE] converts 1 character. [ICODE]strlwr()[/ICODE] converts a string | |
Re: Try adding the % sign before the word [I]calories[/I] in your output string. | |
Re: [QUOTE=Etherwind;1173293]So do the double quotes mean string literal while the single quotes get interpolated? And that fixed it, danke.[/QUOTE] Not quite. Double quote is a string literal, Single quote is a single character. | |
Re: [QUOTE=zimmy130;1173133]Hey there guys, First time poster here, so I apologize for being a rookie. [/quote] Then you should have been posting for the past year. Then you wouldn't be a rookie :icon_mrgreen: [QUOTE=zimmy130;1173133]This is my first VB class and im having a hard time with For-Next loops. As you can … | |
Re: If you start your mask as [iCODE]unsigned displayMask = 1 << 31;[/iCODE], what is [I]reverse[/I] after executing [iCODE]reverse <<= 1 ;[/iCODE]? | |
Re: Variable names are case sensitive, but file names are not. [B]#include <IoStream>[/B] would work just as well. | |
Re: Look through the input string a character at a time. For anything that's a letter, display the letter and ask the user to enter a value. | |
Re: [url=http://www.gidnetwork.com/b-58.html]Here's[/url] what [B]Lerner[/B] was referring to on line 26 -- [ICODE]feof()[/ICODE] and [ICODE].eof()[/ICODE] are identical. | |
Re: [QUOTE=ajsavoca;1172519]The problem doesn't occur until the comparison between the user's sequence and the generated sequence. [CODE=c] do { a = 0; for(b = 0; b <= 5; b++) { srand ( time(NULL) ); lotto[b] = rand() % 53 + 1; } for(b = 0; b <= 5; b++) { if(ticket[b] … | |
Re: Please learn for [url=http://www.gidnetwork.com/b-38.html]FORMAT your code[/url]. It is very difficult to read, and if we can't read it, most of us will skip your posts. Wouldn't it be better to print the average [I]after[/I] it's calculated rather than just before? | |
Re: A couple things, 1) Get rid of the [iCODE]system("CLS")[/iCODE]. It's in your way, you can't see what's happening. If you [I]really[/I] need them for your instructor, add them later, otherwise don't use them at all. 2) Look carefully at what your [iCODE]stationsswitch()[/iCODE] function is returning. | |
Re: You can't do an [B]addition[/B] and [B]xor[/B] at the same time | |
Re: Look for memory leaks. You may be running out of memory. | |
Re: That depends a lot on how you have the data designed and a host of other stuff. Details are necessary. | |
Re: Suppose you read the Member Rules. | |
Re: [QUOTE=casjackkwok2001;1172667]HI ALL. I'M LOOKING FOR A SOLUTION FOR MY CODE. I WANT TO FIND THE [B]HIGHEST CHARGE[/B] AFTER AN ARRAY HAS SHOWN UP(SPEAKER'S FEE). WHAT CAN I DO?? THANKS HERE'S MY CODE: [/QUOTE] First: STOP SHOUTING!!!! It's very rude Second: Use CODE tags! Descriptions are all over this site. Third: … | |
Re: Once you enter a function the size of the array is lost since the array address is passed, not the entire array. | |
Re: [QUOTE=SCoder1;1172605]How would I loop a switch statement until one of the valid options are entered. would this work? [/QUOTE] It will work fine if you set up the while condition correctly. Your condition is always TRUE. | |
Re: If the file contains a [I]letter,number[/I] why are you reading 2 integers? Don't you need to read a character and integer? | |
Re: [QUOTE=PDB1982;1169924]So, I figured out that I needed to make my private const variable into a public const variable, but how do I insert it into main? [/QUOTE] What does "[I]insert it into main[/I]" mean? | |
Re: That is perfectly legal. For example: [code] cout << "This " << "is " << "a " << "valid " << "statement " << endl; [/CODE] Whitespace is ignored, so \n, SPACE, and TAB can be used most anywhere. [EDIT] Looked at your post again and missed the [B]#define[/B].... You're … | |
Re: You've got 87 lines of code. If we don't know which line has the error we can't suggest much. When asking for help, provide all the details you can. | |
Re: I would guess your problem is with the << and & operators. [B]<<[/B] is the bit shift operator [B]&[/B] is the AND operator With that you should be able to look them up and figure the statements out. | |
Re: Could you please give us an example of what you want rather than half an explanation using strange code? | |
Re: You've made a Windows program instead of a Console application. | |
Re: Roman numerals don't have decimals. It's therefore undefined so you can pretty much do whatever you want. | |
Re: What happens when you read a blank line and try to tokenize nothing? How can you tell the blank line is read? How is it different from the other lines? | |
Re: [QUOTE=XerX;1171218]Hello. I am asking for help. I have 2 input files containing sorted integers. These 2 have to be concatenated into a third file and now all the integers must be sorted. (Example: file1 contains 1 5 8, file2 - 2 3 6 and file3 must contain 1 2 3 … | |
Re: [QUOTE=hkdani;1164630]Using the Free Borland 5.5 command line compiler?[/QUOTE] Borland 5.5 is not a Turbo compiler. Turbo stopped at ver 4. [QUOTE=xavier666;1164684]@aianne I would recommend you scrap that compiler (which supports non-standard header files) and get yourself a new one that supports C99 I would recommend [URL="http://sourceforge.net/projects/codeblocks/"]Code::Blocks.[/URL][/QUOTE] And how does that … | |
Re: If each record is [B]terminated[/B] by '%', why are you testing the [B]first[/B] character of the line read? | |
Re: Since you never initialized the [B]mem[][/B] array, try displaying it just to see what's in it. It could be anything, including 'R'. | |
Re: [QUOTE=stankit;1169957]I need to write a program that asks for the input of variables and one variable must be entered as "?", but I cannot get the program to use "?" at all. Also, I don't know how to create a driver function. Once I get the "?" input working, will … | |
Re: [QUOTE=sknake;1068915]If you are in fact Tomm Gunn, thus a guy...[/QUOTE] [QUOTE=Ancient Dragon;1068942]I know for a fact that Narue is female. [/QUOTE] Haven't you ever heard of Sybil? | |
Re: Are you having a problem you're not telling us or just asking a strange question that's hard to decipher? | |
Re: [QUOTE=jimJohnson;1164790]apologize for the missing code tags and in regards to the size we are required to minimum of 1000 lines [/QUOTE] That doesn't mean you have to post every single line, does it? Just post the section that you are having trouble with. And next time, just EDIT the previous … | |
Re: [QUOTE=MTW1989;1169853]My issues are: 1. How do I store the scores in arrays, then recall them?[/quote] You need to check your textbook for how to store values in an array and how to get the value. It's well defined in the chapter on arrays. [QUOTE=MTW1989;1169853]2. How do I prompt the user … | |
Re: Since you are writing a student project on rolling dice, not solving universal chaos theory, [B]rand()[/B] is more than adequate. | |
Re: Actually, using [ICODE]strcpy()[/ICODE] over the same buffer is not defined. See [B]section 2.14.13 strcpy[/B] [url=http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.14.html]here[/url]. Also [url=http://www.gnu.org/s/libc/manual/html_node/Copying-and-Concatenation.html]here[/url] and [URL="http://tigcc.ticalc.org/doc/string.html#strcpy"]here[/URL]. You need to copy into a different buffer. | |
Re: When [B]i[/B] is 4 you are testing beyond the range of your array [iCODE]if ( in[i] > in[i+1] )[/iCODE] There is no [B]in[5][/B] as your code is using. | |
Re: The pertinent and [I]useful[/I] posts in [url=http://www.daniweb.com/forums/thread268915.html]this thread[/url] have been moved here. Maybe [B]aianne[/B] can now start getting help without being railroaded into useless arguments. Keep it on topic. Go back to the other thread for arguing. [edit] Post ONLY help for [B]aianne[/B] here. Continue the argument in the other … | |
Re: [QUOTE=ayan2587;1169556]well if u r that smart to understand it, u must also realize that the solution was given to the exact problem... the array can always be declared according to the size of input dynamically... P.S. if u hav a solution , post it..dont just sit around and mock at … | |
Re: Look up exactly how the [iCODE]switch()/case[/iCODE] statement works. Look up how [iCODE]string[/iCODE] type works when passing/returning using functions. | |
Re: [QUOTE=oakes121;1169417]my almost works but for some reason after i look up the product it checks each value inputted in the array. How do I get it to find the specific item in the array?[/QUOTE] Your last loop prints out "not found" for every item that doesn't match. In reality, that … | |
Re: Read the entire input in one line with [ICODE]fgets()[/ICODE]. Then check the input to make sure it is in the correct format. If not, do what you need to do. If so, convert the character digits to numbers for [B]n1[/B] & [B]n2[/B] and move the letter to [B]lett[/B] | |
Re: What is the condition that causes TRUE? What == what? That goes in the 2nd part (condition) of the [B]for()[/B] loop. The condition does not have to be based on [B]k[/B], but if you are running from [B]k[/B]=0,1,2... until [B]val[/B] == 10 (something calculated in the loop), you can certainly … | |
Re: [QUOTE=MyrtleTurtle;1167257]Do you mean that you don't want to have to press enter after each (one character) number is entered? If so, then yes it is possible. I'm sure I have seen this done a different way, but here is one way anyhow: [CODE] char num1, num2, num3, num4, num5; cout … |
The End.