5,676 Posted Topics
Re: Look up "tree traversal" | |
Re: You need to read the input as characters Test each character to make sure it's a digit If so, convert the value to int/float. | |
Re: Sure. [url=http://www.gidnetwork.com/b-59.html]See this[/url] and specifically [url=http://www.gidnetwork.com/b-60.html]this[/url] | |
Re: Why not? Just print '|'. [CODE]#include <iostream> using namespace std; int main() { cout << "||||||||||" << endl; return 0; } [/CODE] | |
Re: It just means somewhere you defined a variable [B]p[/B] and didn't use it in the code. | |
Re: [QUOTE=gajji2020;1129346]I am done wid the ouput but iam not able to do the Vertical lines "|".. can anyone help me.. wid the logic. I am doing preorder... [/QUOTE] [I]wid?[/I] Is this some kind of slang in India? Since I can't follow your program even [I]with [/I]CODE tags, and your explanation … | |
Re: [QUOTE=bluelinebrotha;1134222]Hey all, Currently I live in Maine, but as of late, I would like to take my family to IL and get a fresh start. The only problem is finding a tech job down there while still living here. Any tips on how I might go about doing this? Thanks, … | |
Re: Looks to me like you need to explain in detail what the problems are -- and [I]where[/I] in the code you're having problems. I don't see a problem in [ICODE]compShip()[/ICODE] which it sounds like you're complaining about. | |
Re: When would you like it? How complex should we make it? Can you teach us what a music cutter is? How do we read the music? Convert from what to what? | |
Re: [url=http://www.daniweb.com/techtalkforums/thread78223.html]Maybe this will help more[/url] tan the other link | |
Re: [QUOTE=padtes;1127853]The only thread I got negative, in my honest opinion, are from idiots to put it mildly. And I get down graded? The reputation and power to change reputation is really beyond my ability to understand.[/quote] I don't really see your problem. You have 9 positive rep posts and only … | |
Re: I don't know what you need there doesn't seem to be anything wrong with the getline statement what is wrong with the binary search you should really explain the problem so we understand the difficulty when you don't we just don't have any clear idea what might be wrong because … | |
Re: 1) Use consistent formatting. [url=http://www.gidnetwork.com/b-38.html]See this[/url] 2) You should know loops by now, use them. 3) I see no counters -- important is you want to count things 4) I see no comparisons -- also important for obvious (I hope) reasons. If you don't know about 3&4, you're not ready … | |
Re: Maybe it might be a good idea to look up [B]switch[/B] in your book. Books generally explain these things. | |
Re: [QUOTE=react05;1134645]Nevermind. No one answered but I got it now.[/QUOTE] Well, someone didn't ask a question. | |
Re: Completely depends on what you know. Since you gave us no hint (i.e. code) there's not much to explain. | |
Re: [QUOTE=dusktreader;1134008]You're asking for a solution to your homework? I'll give you a hint: Depth First Search.[/QUOTE] Only good for a tree. I think you mean Permutations. | |
Re: [QUOTE=sk8ndestroy14;396227]Kennedy didn't deliver the promised air support during the bay of pigs invasion and betrayed the ani castro cubans and the CIA in not doing so. The CIA was then humiliated. [/QUOTE] I heard just the opposite. Kennedy did not want the Bay of Pigs to happen. But the CIA … | |
Re: A clarity suggestion: You are using a variable names [I]number[/I] to control the loop. But [I]number[/I] is not a number. It is an EOF indicator. I recommend all variables be named something that indicates their real use -- in this case maybe [I]indicateEOF[/I] or [I]EOFentered[/I]. Something like that. | |
Re: If the file has variable length lines, no. | |
Re: [QUOTE=yila;1132791]that's why i never use them, braces till is absolutely necessary i hate to fight my way thru a forest of {{{{{{{}}}}}}} and if i put to many of them i always got errors at my compilation as i got them messed up.[/QUOTE] So sad. You have bad formatting practices … | |
Re: Interesting that people believe the alleged [I]separation of church and state[/I] exists. Are you unaware that when after the country was founded, a prayer was said at the opening of a Congressional session? When did this practice stop? If there is a separation, how do you explain [url=http://en.wikipedia.org/wiki/Chaplain_of_the_United_States_Senate]this[/url], [url=http://en.wikipedia.org/wiki/Chaplain_of_the_United_States_House_of_Representatives]this[/url], and … | |
Re: [QUOTE=mitrmkar;1133679]The condition you have in the [ICODE]while()[/ICODE] is not working. [/quote] But why not? Maybe an explanation is in order so the error does not happen again... [code] while(cin) { getline(cin, str); s_v.push_back(str); } [/code] In this code, the loop exits after [ICODE]cin[/ICODE] is in an error condition. After reading … | |
Re: So use [ICODE]%u[/ICODE] for unsigned decimal instead of [ICODE]%d[/ICODE] for signed decimal. And declare your variable as [ICODE]unsigned[/ICODE]. | |
![]() | Re: I have no idea why every post here is resurrecting an old thread with completely off topic questions, but it won't happen again... |
Re: [QUOTE=COKEDUDE;1132853]When you have a function and need to scan for 2 different numbers, should the scanf be in the function or in the main() and why?[/QUOTE] No, you should not put the input in the function. The function's purpose is to do calculations, so keep it simple. Maybe another function … | |
Re: [QUOTE=gerard4143;1132977]This was written quickly...I hope its correct..[/QUOTE] Would it have taken long to give the code a quick test? And there is no reason to call [ICODE]exit()[/ICODE] every time you need to stop a program. A simple [ICODE]return[/ICODE] will exit the program from [ICODE]main()[/ICODE] | |
Re: It's actually much more difficult than [B]jephthah[/B] described. In order to make sure the user types only the correct thing, you need to look at all the characters entered and test each character for validity (called [I]parsing[/I]). [I]Then[/I] you can decide to convert the values into integers and floats or … | |
Re: If you want 30 minutes: Call time() to get the current time - say [I]tstart[/I] Add number of seconds in 30 minutes to [I]tstart[/I]. Call time() every cycle -- say [I]tnow[/I] When the [I]tnow[/I] >= [I]tstart[/I], call function2. When function2 returns, reset [I]tstart[/I] | |
Re: Do you know what a [I]void function[/I] is? Do you know what it returns? | |
Re: [QUOTE=AmigaCarolena;1132869]Gee, I'm sorry. I really don't need attitude, I need help. If you cannot reply in a decent manner, please don't reply. [/quote] No one gave you attitude. You [I]have[/I] been notified about CODE tags before, and ignored the information. [QUOTE=AmigaCarolena;1132857]/*O.k. I am down to a few less errors. I … | |
Re: [url=http://www.daniweb.com/techtalkforums/thread78223.html]How to ask for help on this forum[/url] | |
Re: Please use punctuation so we understand your question. Your 1st sentence is barely understandable. Please [url=http://www.daniweb.com/techtalkforums/thread78223.html]read this[/url], and note the title. | |
Re: hi, whats the challenge here? im not going to write you the code so you can submit it your teacher. you have not imposed any sort limits on your sort algorithm such as x^2 running time. i could write you a bogosort to solve your problem but its not practical. … | |
Re: [QUOTE=THEOUTLANDER;1027980]ok i have made a calculator using turbo c but it keeps disappearing when i choose the run command can any body help me please [/QUOTE] Maybe if you USE CODE TAGS and [url=http://www.gidnetwork.com/b-38.html]Format your Code[/url] we might be able to help you. But your code is unreadable without formatting. | |
Re: [QUOTE=c1979h;1131148]Okay I changed the counter variable to maxValue and I now get an 3 output errors and one before for error, here is the code [/QUOTE] You claim there are 3 errors. Do you think it might be helpful to let us know what they are? After 15 posts, you'd … | |
Re: Although not perfect, your formatting is [I]much[/I] better. Thank you. [QUOTE=newcuser;1131990]I am getting a compile error I do not understand on the line printf statement right below the end of the do while loop. It says printf identifier. Help?[/QUOTE] That's because there is no such thing as a [ICODE]do while[/ICODE] … | |
Re: Add another variable [B]k[/B] to keep track of the [B]an[][/B] array position. | |
Re: [QUOTE=adcodingmaster;1129517]Instead of reading character by character use "fread" to read more than 1 character from file at a time. And then use "fwrite" to write them to the output file. You can also use "fgets" to read a file line by line. Because "fgets" terminates reading on "\n" (new line … | |
Re: Look at the code for the [ICODE]SetYear()[/ICODE] and [ICODE]GetYear()[/ICODE] routines. The answers are there. Or are you supposed to write them? | |
Re: [QUOTE=newcuser;1131090]Here is what I have so far. Suggestions??[/QUOTE] I suggest you explain the problem. We aren't psychic... | |
![]() | Re: How can we possibly tell you what's wrong with the code without seeing it? |
Re: NOT UNTIL YOU READ [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]THIS[/url]! And stop yelling. We can 'hear' you. | |
Re: Define "won't run" 400 lines of code with no idea what we're looking for nor why is not going to happen easily. | |
Re: [QUOTE=terabithia;1127420]Hi.. I suppose to have a programe to read a data from a file and enqueu it to the Queue. The programme works like a Priority queue whether the ladies queue need to be inserted to queue first before the gentleman... But i think i need to try first how … | |
Re: [B]d[/B] is the remainder of n/10. If n=32, d=2. There is no [B]d[/B] in the previous problem. | |
Re: [ICODE]return x;[/ICODE] will return the value [B]x[/B] to the calling routine. If you called the function with [ICODE]rt = func();[/ICODE] [B]rt[/B] will contain whatever [B]x[/B] was. [ICODE]break;[/ICODE] will immediately exit a loop even though the loop is not finished. [code] for (i=0; i<10; i++) { --stuff-- if (i == 7) … |
The End.