5,676 Posted Topics

Member Avatar for jcps65

Confused with what? Is the [I]saleamount[/I] equal to the GNP? Does it crash your computer? Does it make bad coffee?

Member Avatar for WaltP
0
144
Member Avatar for COKEDUDE

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

Member Avatar for WaltP
0
909
Member Avatar for mjltech
Member Avatar for mjltech
0
91
Member Avatar for Etherwind

[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.

Member Avatar for WaltP
0
104
Member Avatar for zimmy130

[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 …

Member Avatar for zimmy130
0
303
Member Avatar for TimCereja

If you start your mask as [iCODE]unsigned displayMask = 1 << 31;[/iCODE], what is [I]reverse[/I] after executing [iCODE]reverse <<= 1 ;[/iCODE]?

Member Avatar for TimCereja
0
601
Member Avatar for Fenlevi

Variable names are case sensitive, but file names are not. [B]#include <IoStream>[/B] would work just as well.

Member Avatar for jonsca
0
137
Member Avatar for confuse89

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.

Member Avatar for Buttacup
0
78
Member Avatar for YeMiller

[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.

Member Avatar for WaltP
0
145
Member Avatar for ajsavoca

[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] …

Member Avatar for ajsavoca
0
125
Member Avatar for pinknblu

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?

Member Avatar for pinknblu
0
186
Member Avatar for robski

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.

Member Avatar for robski
0
92
Member Avatar for juuuh333
Member Avatar for juuuh333
0
3K
Member Avatar for RandyWhite
Member Avatar for akssps011

That depends a lot on how you have the data designed and a host of other stuff. Details are necessary.

Member Avatar for WaltP
0
89
Member Avatar for karanjaswal
Member Avatar for casjackkwok2001

[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: …

Member Avatar for WaltP
0
361
Member Avatar for hurricane123

Once you enter a function the size of the array is lost since the array address is passed, not the entire array.

Member Avatar for WaltP
0
63
Member Avatar for SCoder1

[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.

Member Avatar for WaltP
0
94
Member Avatar for f0rd

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?

Member Avatar for WaltP
0
283
Member Avatar for PDB1982

[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?

Member Avatar for david.k
0
178
Member Avatar for ccaatty

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 …

Member Avatar for cassandy
0
105
Member Avatar for William Hemsworth
Member Avatar for vivosmith
2
426
Member Avatar for som3aman

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.

Member Avatar for Lerner
0
2K
Member Avatar for nx86

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.

Member Avatar for WaltP
0
113
Member Avatar for skorm909

Could you please give us an example of what you want rather than half an explanation using strange code?

Member Avatar for WaltP
0
173
Member Avatar for cowboyz209
Member Avatar for WaltP
0
154
Member Avatar for blind122

Roman numerals don't have decimals. It's therefore undefined so you can pretty much do whatever you want.

Member Avatar for WaltP
0
310
Member Avatar for MonteM

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?

Member Avatar for Fbody
0
140
Member Avatar for XerX

[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 …

Member Avatar for WaltP
0
156
Member Avatar for aianne

[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 …

Member Avatar for Top9ne
0
1K
Member Avatar for edicar

If each record is [B]terminated[/B] by '%', why are you testing the [B]first[/B] character of the line read?

Member Avatar for Ancient Dragon
0
104
Member Avatar for rsg31

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'.

Member Avatar for thomas_naveen
0
188
Member Avatar for stankit

[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 …

Member Avatar for WaltP
0
324
Member Avatar for jephthah

[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?

Member Avatar for jephthah
3
682
Member Avatar for corby

Are you having a problem you're not telling us or just asking a strange question that's hard to decipher?

Member Avatar for WaltP
0
155
Member Avatar for jimJohnson

[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 …

Member Avatar for VernonDozier
0
509
Member Avatar for jephthah
Member Avatar for MTW1989

[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 …

Member Avatar for WaltP
0
2K
Member Avatar for redworc53

Since you are writing a student project on rolling dice, not solving universal chaos theory, [B]rand()[/B] is more than adequate.

Member Avatar for WaltP
0
2K
Member Avatar for lionaneesh

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.

Member Avatar for Ancient Dragon
-1
163
Member Avatar for mebob

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.

Member Avatar for WaltP
0
89
Member Avatar for aianne

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 …

Member Avatar for WaltP
0
152
Member Avatar for honeyboynasa

[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 …

Member Avatar for ayan2587
-1
136
Member Avatar for joeman33

Look up exactly how the [iCODE]switch()/case[/iCODE] statement works. Look up how [iCODE]string[/iCODE] type works when passing/returning using functions.

Member Avatar for WaltP
0
126
Member Avatar for tquiva
Member Avatar for oakes121

[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 …

Member Avatar for WaltP
0
91
Member Avatar for Darkest Shine

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]

Member Avatar for Salem
0
130
Member Avatar for heynow12

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 …

Member Avatar for phyrtech
0
170
Member Avatar for wilsonz91

[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 …

Member Avatar for WaltP
0
2K

The End.