5,676 Posted Topics
Re: See: [url=http://www.gidnetwork.com/b-57.html]this[/url] [url=http://www.gidnetwork.com/b-62.html]this[/url] [url=http://www.gidnetwork.com/b-56.html]this[/url] and [url=http://www.gidnetwork.com/b-66.html]this[/url] | |
Re: Is there anywhere in your problem description that states you [I]must[/I] save each input somewhere? | |
Re: And what is [iCODE]if (pos=str.find("<" && ">",pos+1)) [/iCODE] supposed to do? You said "[I]My problem is it is not working right[/I]" which is fine but tells us absolutely nothing. So I waited with bated breath for what it was doing wrong. All I got was "it seems to be here". … | |
Re: As you show the number of birds, add the number to a running total, like [iCODE]totlaBirds += numberOfBirds[/iCODE] Be sure to zero the total before starting. | |
Re: My psychic powers aren't working well. The problem I got was it made the coffee too bitter. | |
Re: Just call the function. There's no magic about it at all. | |
Re: Look at the [B]hint[/B] and rewrite your input functions first. Where did you find the second code? | |
Re: Move your [iCODE]fac = 1;[/iCODE] just before your factorial loop. | |
Re: [QUOTE=lalala423;]PLEASE HELP! [/quote] Don't shout. We can hear you! [QUOTE=lalala423;]I don't know what to do for main.cpp.. [/quote] Function call that solve the problem. Loops to go through the matrix... IFs to test the return values from the calculation with the greatest sum found so far. No file access at … | |
Re: Print out your values in [iCODE]main()[/iCODE] between your function calls. See where the values become bad. | |
Re: What's your problem? It's not polite to make us guess. | |
Re: [QUOTE=oybek;]Hi guys, I'm not good at programming so would you help me with this?! No fancy codes, just make it simple.[/QUOTE] So you want us to provide you with the answer to this program? Just make it simple. Is that correct? | |
Re: I'd be willing to help if I could read your code. You need to [url=http://www.gidnetwork.com/b-38.html]format it[/url] so all of us can see what you are doing -- including you. | |
Re: It's easiest to help you if you attempt to write [I]option1()[/I] and if it doesn't work post [I]that[/I] code. Then we can see what you tried and explain how to fix it. | |
Re: Asking a question on a Forum does not give you the right to a perfectly coded answer to your question. | |
Re: [QUOTE=Veneficvs;1520147]Thank you very much, sir! But how do I rotate to the right k positions, please? From what I see there, it rotates it to the left one time. Thanks.[/QUOTE] So do it [B]k-1[/B] more times -- use a loop. | |
Re: OPEN a file WRITE or PRINT the data CLOSE the file. | |
Re: [QUOTE=alex1050;1519879]yeah triumphost thats what im trying to do...how can i achieve this?[/QUOTE] You [B]are[/B] allowed to read more than just the last post. [B]Arbus[/B] gave you the solution. | |
Re: Since your nodes don't store the parent, about the only thing you can do is read all the nodes and look for your current node in the children pointers. IMO, you need to modify your node structure to add the parent node since you are traversing up the tree. | |
Re: The only thing I did not see in this thread is: Use the [ICODE]difftime()[/ICODE] function check the time difference. But what I do see is a lot of help given and no attempt, only attitude, from the person asking for help. Please reread this thread and try using the help … | |
Re: [QUOTE=manofhouse;1519722]yea i know but unfortunately its a requirement to check both[/QUOTE] No, it's a requirement to [B]have[/B] a check for both. It's not a requirement to continue checking after a failure as [B]Vernon[/B] suggests. | |
Re: [url=http://www.gidnetwork.com/b-38.html]Format your code[/url] so we can follow it. Then tell us what's happening, don't make us guess. | |
Re: It looks to me like everyone miss this line in your instructions: [QUOTE=codeyy;]train construction commands from standard input (i.e. just use [B][COLOR="Red"]read[/COLOR][/B]).[/QUOTE] Your instructor told you what command to use for input, didn't he? I agree [iCODE]fgets()[/iCODE] is better. Then again, maybe he meant it only as an example. | |
Re: where did you follow the [I]hint: use an integer array of size 128 and use the ASCII values of letters to index into the array to store and retrieve counts for the letters[/I]? By not using the hint, your code is much larger than it needs to be. | |
Re: You posted Code that makes no sense at all. [CODE] 1) Output a message 2) define a string variable 3) Sort nothing since all you did was declare a variable 4) declare a prototype for a non-existant function 5) start a loop the a) inputs a string b) outputs the … | |
Re: That's because [iCODE]if ( time1 != 'p' || time1 != 'a' )[/iCODE] is always FALSE. Write out a truth table for your comparison. | |
Re: Look up the methods of the [I]string[/I] class. There's a lot you can do with it. | |
Re: You're welcome. But for what I don't know. It's hard to answer your question since you didn't ask one. | |
Re: I use [iCODE]instr()[/iCODE], [iCODE]mid()[/iCODE], [iCODE]right()[/iCODE], and [iCODE]left()[/iCODE] | |
Re: Interesting post. You might want to work on your [url=http://www.gidnetwork.com/b-38.html]formatting[/url], though. It's inconsistent. | |
Re: [QUOTE=rbduck09;1517338]I made the report header in the printHeaderInformation function what I don't understand is the instructions to create the table for the amortization[/QUOTE] That statement makes no sense. You wrote all that code and don't know how to output the data from it? I guess you need to give a … | |
Re: [QUOTE=tricket_7;1516863]I am working on a rainfall program that will ask the user to enter the total rainfall for each month, then will calculate the total rainfall for the year, the average monthly rainfall and is supposed to display the month names for the highest and lowest month. I have everything … | |
Re: [QUOTE=cse.avinash;]There is some error, due to which I am getting wrong answer.[/QUOTE] 1) If "[I]there is some error[/I]" then you have a mistake. We are not psychic. What's the error? 2) [url=http://www.gidnetwork.com/b-38.html]Format your code[/url]. We can't help you if we can't follow the code. | |
![]() | Re: The [I]time()[/I] function is not used by the [I]rand()[/I] function. It's only a way to seed the [I]srand()[/I] function with a different value every time it's called. [I]rand()[/I] returns a value from 0 to RAND_MAX (32767 on many systems). ![]() |
Re: [QUOTE=diedie;]I ask a user to input {2 + (3-6) * 8} as a string. then I want every each of the string in array : ar[0] = { ar[1] = 2 ar[2] = + ar[3] = ( and so on until } how do I implement this in c++?[/quote] Every … | |
Re: Also, one of your [iCODE]do-while[/iCODE]s is testing [B]repeat1[/B], but the variable is never set nor read. It contains garbage. | |
Re: These are questions for you to consider, not to tell me: Where do you ask for YES or NO? Where do you accept the answer? Into what variable? Where is the end of the loop that requires the answer? What makes it continue/exit? Do all these lines make sense in … | |
Re: In order to get help, you need to ask a question, not just post code and hope we can figure out [B]if[/B] there's an error and what it might be.. | |
Re: You need to change them to GRAPHICAL in order to change the color. | |
Re: You didn't pass your file pointer into [iCODE]fn_out()[/iCODE]. You created another one which was destroyed when the function ended. Pass [I]fp[/I] into your open function. Also, [url=http://www.gidnetwork.com/b-62.html]see this[/url] about [iCODE]scanf()[/iCODE] and [url=http://www.gidnetwork.com/b-57.html]this[/url] about [iCODE]fflush()[/iCODE] | |
Re: That's pretty much it, except 1) [ICODE]main()[/ICODE] is an [B]int[/B], so always use [ICODE]int main()[/ICODE]. 2) Watch your [url=http://www.gidnetwork.com/b-38.html]formatting[/url]. Be consistent. This section [code] while ( i <= num ) // factorial { result *= i ; i++ ; } cout << num << " ! = " << result … | |
Re: [QUOTE=DaniwebOS;]I'm getting a LN2019/LN1120 error, and I have no clue why... any suggestions?[/quote] My guess if you did something wrong somewhere in that 100 lines of code that the compiler didn't like and it gave you a cryptic error message that no one understands because we aren't compilers. Try posting … | |
Re: Peeps? :icon_rolleyes: [url=http://lmgtfy.com/?q=C+printf]Try This[/url] and [url=http://lmgtfy.com/?q=+scanf]This[/url] | |
Re: Look carefully at the parameters being passed to the print function. They are incorrect. | |
Re: Out with the Bad Blud, in with the good -- no wait, that's not right... | |
Re: [code] void PartA(); // These are function prototypes, void PartB(); // which is good and proper. void PartC(); void PartD(); void PartE(); void PartF(); void PartG(); void PartH(); int main() { FileOut.open ("o:\\Answers2.txt"); void PartA(); // These also are function prototypes, void PartB(); // not function calls void PartC(); // … | |
Re: You are making it hard on yourself. The board should be 4x4 because those are the playing positions. On output you should add the borders. That would alleviate all the checking to see if you are going to trash a border or not. | |
Re: [QUOTE=shonen;1515372]i have d same problem. [/QUOTE] If you have the same problem, read this thread. It's marked [I]solved[/I] so the solution has been found. | |
![]() | Re: [QUOTE=rperez3;]Hello, I just joined this web site and i'm new to programming and i'm stuck on this program, can't seem to finish it, after couple of days of trying to figure this program out, i realize i need help. The program is pretty much done i just don't know where … |
The End.