5,676 Posted Topics
Re: 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. | |
Re: 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 … | |
Re: 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]. | |
Re: 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. | |
Re: [url=http://www.gidnetwork.com/b-45.html]Here's something[/url] you may want to look at. | |
Re: [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 … | |
Re: 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 … | |
Re: 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] | |
Re: [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? | |
Re: You can't. [iCODE]scanf()[/iCODE] [I]requires[/I] an ENTER. And why is [I]continue[/I] plural? | |
Re: 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? | |
Re: 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. | |
Re: [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 … | |
Re: 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. | |
Re: [QUOTE=Ribamar23;]printf("%f", b);[/QUOTE] This only outputs a [B]float[/B], not a [B]double[/B]. Try [B]%lf[/B] | |
Re: So why didn't you mark the thread solved? | |
Re: 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 … | |
Re: 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. | |
Re: This thread is stupid -- and closed. | |
Re: Simplify the statement so you can see exactly what is going on. | |
Re: [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? | |
Re: 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? | |
Re: <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 … | |
Re: 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. | |
![]() | Re: 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 … |
Re: [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 … | |
Re: [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. … | |
Re: [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. | |
Re: [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. | |
Re: 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, … | |
Re: 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 … | |
Re: 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? | |
Re: [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 … | |
Re: [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 … | |
Re: [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? | |
Re: Doen't your book explain it? Or your tutorial site? What about [url=http://lmgtfy.com/?q=srand]Google[/url]? | |
Re: [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? | |
Re: [iCODE]for (i=second_letter; i<second_to_last_letter; i++)[/iCODE] ![]() | |
Re: [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 … | |
Re: [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 … | |
Re: Create a loop to loop through each text box. Set the 'current' text box TEXT value to the Random Number generated | |
Re: i am not getting understand either. Your statement makes no sense. | |
Re: 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. | |
Re: [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 … | |
Re: Of course. But what do you expect to gain from doing it? | |
Re: [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: | |
Re: 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. |
The End.