5,676 Posted Topics

Member Avatar for tj104

You are attempting to read [B]XXX[/B] into your integer values. Why are you reading in so many places? Think through your design again.

Member Avatar for Lerner
0
148
Member Avatar for Joker500

CODE TAGS ... read any of the requested information posted all over this site about CODE tags, like 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this forum 3) in the announcement at the top of this forum …

Member Avatar for WaltP
0
523
Member Avatar for sridhar.selva

You can't be getting you data as a string since NUL cannot be part of a string. SOH is questionable too. You are getting your data ins a [I]character array[/I].

Member Avatar for sridhar.selva
0
240
Member Avatar for kuramahiei

I can't even follow your code. Please learn to use [url=http://www.gidnetwork.com/b-38.html]proper and consistent formatting[/url] so those you ask help from can read your code.

Member Avatar for WaltP
0
184
Member Avatar for ThomsonGB

[url=http://www.gidnetwork.com/b-45.html]Here's something[/url] you may want to look at.

Member Avatar for ThomsonGB
0
139
Member Avatar for cali_kid

[QUOTE=cali_kid;]the assignment says i can only use variables of type "int" so my question is how to print the average to 2 decimal places using only int and not floats. [/QUOTE] Does the assignment say print 2 decimals using only ints? Think back on you elementary math. How do you …

Member Avatar for cali_kid
0
151
Member Avatar for FraidaL

Forget the [B]new[/B] operator. You don't need it. [QUOTE=FraidaL;]I have it somewhat ok, until the end where it's supposed to give the average. I tried a couple things but none of them gave me the right answer. [/quote] What's your definition of "[I]somewhat ok[/I]"? If it doesn't give you a …

Member Avatar for FraidaL
0
3K
Member Avatar for while(!success)

You can't assign a string to a float value. You have to convert the string into a floating point number. Look it up. Key word is [I]convert[/I]

Member Avatar for WaltP
0
2K
Member Avatar for utkarshsahu

[QUOTE=utkarshsahu;]I wanted to write a program to check if string entered is a palidrome. I wrote a program but i get errors while compiling. Can anyone help me identify errors in the program.[/QUOTE] Are we supposed to guess what the errors are? Or would you like to tell us?

Member Avatar for utkarshsahu
0
184
Member Avatar for outout1234

You can't. [iCODE]scanf()[/iCODE] [I]requires[/I] an ENTER. And why is [I]continue[/I] plural?

Member Avatar for Arch Stanton
0
179
Member Avatar for Zssffssz

Let's see if I got this right. Your school banned system calls. You want to bypass that ban and make system calls anyway. Sounds to me like you are trying to do something they don't want you to do. Do I have the facts straight?

Member Avatar for Zssffssz
0
127
Member Avatar for coroche

Assuming you won't have any input like Victor Von Doom St. Louis Dick Van Dyke New Rochelle Use 3 [iCODE]while[/iCODE] loops and 1 index into the buffer. First and Second [iCODE]while[/iCODE] copies until a SPACE is seen Third copies until a \0 is seen.

Member Avatar for AdamLad3
0
104
Member Avatar for DaniRulz

[QUOTE=DaniRulz;]bharat please show me what to do. im really inexperienced at this course...[/QUOTE] Really? You haven't take it 3 times yet? You must be inexperienced... [QUOTE=DaniRulz;]... and i could do with some help.[/QUOTE] What you can do is ask questions. We can't read your mind and clear up your confusion …

Member Avatar for DaniRulz
0
261
Member Avatar for FraidaL

Use a loop to reverse the numbers into your temp array. It's bad form to to do all your work in one statement like you did. Do one simple step at a time. It's a nightmare to debug the way you have it.

Member Avatar for FraidaL
0
182
Member Avatar for ar2doq29
Member Avatar for Ribamar23

[QUOTE=Ribamar23;]printf("%f", b);[/QUOTE] This only outputs a [B]float[/B], not a [B]double[/B]. Try [B]%lf[/B]

Member Avatar for WaltP
0
87
Member Avatar for Sohvkhan
Member Avatar for BaconWeave

You're making it complicated with two DO loops inside a FOR loop. Find the first " Start a while loop until you find the next ", copying the name Skip past the " The rest of the line is the number, just use [iCODE]atoi()[/iCODE] at that point. Of course you …

Member Avatar for WaltP
0
220
Member Avatar for imc++

Based on your explanation, I take it you have more to do on the program, but since you didn't ask any question nor explain any problems, all we can assume is you're on track.

Member Avatar for mike_2000_17
0
141
Member Avatar for diane_mendoza
Member Avatar for waldo2000
Member Avatar for phorce

[QUOTE=phorce;]But I'm working on 2 512x512 matrices and when I try to find the Correlation it produces a number like: 1.64643e-14 which is obviously wrong.. I have tried everything.. [/QUOTE] What is [I]obviously [/I]wrong about it?

Member Avatar for phorce
0
94
Member Avatar for dlmagers

When you get to this section of the program that executes: [CODE] //enter gender cout << "Enter Gender: "; cin >> gender; gender = toupper (gender); [/CODE] how many and what keys are pressed? Are all the keys read by the program? Why or why not?

Member Avatar for WaltP
0
122
Member Avatar for Bon243

<blockquote><blockquote>To suggest it, is even more stupid, in my opinion.</blockquote> I don't see how can be interpreted as anything other than name calling and I believe that goes against the principles of this forum. The member rules state in part</blockquote> Sorry,**Rev**, it's not name calling. If he had said "you're …

Member Avatar for RTFMID10T
0
229
Member Avatar for HelpMe1234

You want us to do it for you? Or would you like to ask a few questions? Reread what you posted and try to think of possible help you can get based solely on your post.

Member Avatar for HelpMe1234
0
270
Member Avatar for karoma

The main problem is you aren't 'dealing' the card. It's still in the deck. Your first card is [iCODE]j = rand()%52;[/iCODE] Then remove that card from the deck (shift all values from j thru 51 down 1 entry. Now you have 51 cards left, just like a real deal. Now …

Member Avatar for WaltP
0
131
Member Avatar for evanovan

[QUOTE=Ancient Dragon;]A more generic way would be to first convert the int to string, then copy the digits in reverse order (from right to left) into another string adding the commas. Finally you will have to reverse the result string because it will be backwards. std::reverse() will do that.[/QUOTE] Unless …

Member Avatar for evanovan
0
175
Member Avatar for Vasthor

[QUOTE=Vastor;1771048]in coding, how do you actually track down the bug??? example this code where we want to find the quartile....[/quote] Too late now, but before you write too much code, compile and test in smaller pieces. Now, start outputting variables at key places to follow what the code is doing. …

Member Avatar for mike_2000_17
0
107
Member Avatar for triumphost

[QUOTE=triumphost;1771305]Is it Dangerous to Derive from STD? Specifically std::string.[/QUOTE] As far as I know, no. That's why objects exist. You start with an object that does most of what you want and add more functionality to it for your specific needs.

Member Avatar for mike_2000_17
0
102
Member Avatar for ItsAdZy

[QUOTE=jigglymig;]arrays start with 0, the [12] is a null which is used to indicate the end of the array.[/QUOTE] No, the [12] is not a null, it's the [I]next variable[/I] in the data area. [11] is the end of any array with 12 elements.

Member Avatar for WaltP
0
175
Member Avatar for Vladnaka
Member Avatar for varul7

4 posts -- all very poor. Maybe this will help you get better help, by giving better information: [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, …

Member Avatar for varul7
0
935
Member Avatar for cmcmurugan
Member Avatar for mustafasadikot

Here's your reply: [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 …

Member Avatar for WaltP
0
134
Member Avatar for arold10

I don't seem to understand the difficulty. Can you do the task without using a function? If so, why would a function cause a problem?

Member Avatar for arold10
0
316
Member Avatar for chuyauchi

[QUOTE=chuyauchi;]What is the best way to change the following program into functions? [/quote] Figure out what statements you need in the function and what values you need to pass in. Replace those statements with a function call. Copy the statements to the top or bottom of your program surrounded by …

Member Avatar for WaltP
0
120
Member Avatar for sharathg.satya

[QUOTE=sharathg.satya;] but also the questions asked in the HR round of interview[/QUOTE] I agree it's used to weed out candidate that can program. The answer to give the HR guy is "of what use is finding the greatest of two numbers without using comparison operators? Do you recommend using convoluted …

Member Avatar for sharathg.satya
0
125
Member Avatar for shywolf91

[QUOTE=shywolf91;]I am getting compiler errors[/QUOTE] Really? That's too bad. Could you turn your screen a little left so I can see what the errors are?

Member Avatar for Lerner
0
266
Member Avatar for logicmonster

Doen't your book explain it? Or your tutorial site? What about [url=http://lmgtfy.com/?q=srand]Google[/url]?

Member Avatar for MrEARTHSHAcKER
0
866
Member Avatar for irre

[QUOTE=irre;]hi there im wondering about the difference between: [/QUOTE] When you wrote the test program to output the values, were you able to see what happened?

Member Avatar for WaltP
0
153
Member Avatar for markrodriguez0
Member Avatar for P3rryD

[QUOTE=P3rryD;]HI, I recently joined the forums (today) and i would officially like to say hi. [COLOR="Green"]HI[/COLOR][/quote] HI. Please don't use colors... [QUOTE=P3rryD;]For my question: [COLOR="Red"][B]Are there any books,websites or tutorials that use a moderate vocabulary that teach C++?[/B][/COLOR][/quote] Didn't the post at the top about [B]Books[/B] help? [QUOTE=P3rryD;]Thanks for the …

Member Avatar for WaltP
0
177
Member Avatar for tubby123

[QUOTE=tubby123;]deceptikon, that really was very very good :) yes it worked.But I would like to know, what are the other things that make the code 'unclean'. Thanks once again. :)[/QUOTE] Using [ICODE]gets()[/ICODE] is a BIG unclean move. [url=http://www.gidnetwork.com/b-56.html]See this[/url] Also, changing the value of a variable more than once in …

Member Avatar for tubby123
0
149
Member Avatar for reds8

Create a loop to loop through each text box. Set the 'current' text box TEXT value to the Random Number generated

Member Avatar for WaltP
0
179
Member Avatar for Rashidindia
Member Avatar for tungnk1993
0
84
Member Avatar for Dec28

I don't understand. You need to convert an array of hex values that you output into an integer? Even though you input that integer in the first place? You question is quite confusing. Maybe some details and definitions would help us make sense of your question.

Member Avatar for histrungalot
0
247
Member Avatar for Zssffssz

[QUOTE=Zssffssz;1765182]Im writting a very simple command-line. I want the > Charecter to come up every time a command ha finished what it's doing (easy) AND when the user presses enter with nothing on it. [/QUOTE] I guess it completely depends on your design of how your input works. What [B]I[/B]'d …

Member Avatar for tom12
0
198
Member Avatar for Shishir S
Member Avatar for Esmerelda

[QUOTE=sonal_salkade;1764522]Case expression should be a constant or an expression that reduces to a constant.[/QUOTE] It surprises me that no one before you said anything even remotely like that! Oh wait...! Look at what [B]L7QSR[/B] and [B]deceptikon[/B]said... :icon_rolleyes:

Member Avatar for WaltP
0
127
Member Avatar for shadow29014

Please PLEASE post the grade you get for handing in [B]tungnk1993[/B]'s work/suggestions. I'd really like to know your instructor's comments.

Member Avatar for WaltP
0
227

The End.