5,676 Posted Topics
Re: Took me a while, too. 32 is not thirty two. It's 3 *squared*. Jeez, explain stuff when it's not obvious, people. 9 = 32 is **NOT** obvious. 8-| | |
Re: After 5 years, we figure the thread is dead so we don't have to jump on if. Now if you asked a proper question by starting **your own thread** you'd probably get a good response. | |
Re: Count the A's, SPACEs and -'s in each line, and in each section of each line. Look for numerical patterns. When you see the patterns, write down some calculations that you can turn into code. Use lots of paper, and analyze analyze analyze. Plan plan plan. You'll need a few … | |
Re: No, it won't work that way. Since you open the file(s) in `main()`, you have the file pointers in the `fstream` values. *These* are the values you pass to the functions. That gives the functions access to the files. | |
Re: I believe you are using the wrong index in the line [ICODE]if (random_integer > running_total[i])[/ICODE] Shouldn't that be [ICODE]running_total[B][j][/B][/ICODE]? Also, please work in your formatting consistency. Your code is just a little difficult to follow. [url=http://www.gidnetwork.com/b-38.html]See this[/url]. | |
Re: > 1.how can circular queue can be implemented in a normal linked list??i think it can be implemented in circular singly linked list right?? Right > 2.if i implement it in array how i will connect last element with first element???? When you reach the last element of the array, … | |
Re: 1) Get rid of `system("cls");` -- it's verry annoying to the user. 2) Do not use `goto` -- you don't need it. Use a loop if you need to repeat somthing. 3) You logic is all messed up. a) You start by setting **error** to FALSE b) Then you check … | |
Re: Good for you. Have fun. | |
Re: So what doesn't work? You need to give us informations if you need help. | |
Re: To be honest, I'd use a file management program like [ZTree](http://ztree.com). This is something I do quite often and ZTree makes it extremely easy. | |
Re: What you are trying to do is not trivial. You need to look at the equation as a whole, not search for small parts and process piecemeal. It might be useful to study up on [Reverse Polish notation](http://en.wikipedia.org/wiki/Reverse_Polish_notation) to break up the equation into individual atoms. You can use a … | |
Re: > Giving it some thought you should ignore the previous post The more you backtrack like this (you've done it twice that I know of today) maybe **you** should give it some thought before posting... Maybe??? ;-) | |
Re: First problem I see is the use of GOTO. You should rework the program to use loops instead. Since there is absolutely no context, no comments, and no explanations of what anything is in the code you posted, there is nothing we can tell you about your code. I can … | |
Re: 1) [See This](http://lmgtfy.com/?q=strstr) 2) Not really. Since you know the start and length, you can easily copy the string out. The function [strncpy](http://lmgtfy.com/?q=strncpy) can do it if you understand derefrencing and indexing. 3) `temp[0] = '\0';` -- you set the first entry to 0. | |
Re: That's because `scanf()` stops reading at spaces. You'll have to use something like `fgets()` or a complex/convoluted format specifier in `scanf()`. | |
Re: [Try This](http://lmgtfy.com/?q=C+file+input) | |
Re: You figured correctly. By multiplying by 100 you have eliminated most of the problems floating point values will cause. By the way, when making a post, it **is** OK to actually view it to see how it looks and modify the post so it's readable. Just sayin'. I was going … | |
Re: while(iss){ { string sub; iss >> sub; cout << sub << endl; a=sub.length(); index=sub.find_first_not_of("aeuio"); cout << "first consonant:"<< sub[index]<<endl; harf=sub[index]; sub.insert ( a, harf ) ; sub.insert (a+1, "AY"); sub.erase(index,1); cout << "new word:" << sub << endl; } This section does not do what you want. Even if it … | |
Re: Time for a Moderator to weigh in. I'm raising my hand. **Gonbe**: Do **NOT** give full working answers to questions. **Guide** them to writing their own solutions. > Gonbe: If you've ever gone to school you'd know that partially you do get provided examples of good practices. Generally these are … | |
Re: You can't just `cout << array` and expect anything to happen. An array is a collection of items. You have to output each item. | |
Re: > My compiler gives no error doing this but looking around the web I see many articles saying I should be using the new and delete commands to allocate arrays dynamically. My main question is if this is ok to do? Or will I run into problems in the future. … | |
| |
Re: > // I cant figure it out the total corporate sales, and the member function for quartely on each division *** And we can't figure out how the program flows with no formatting at all. It is extremely important to [format your code](http://www.gidnetwork.com/b-38.html) if you want others to read it. … | |
Re: You made a a Windows project, not a Console project. | |
Re: Or even `putchar` which makes even more sense. How about `write` to stdout? Maybe even write directly to screen memory. That's a neat way. ಠ_ಠ| |
Re: Since your description is quite vague, we don't really know what to look for. Since all switches break, I don't understand what you're describing. All I can suggest is make sure your methods are correct. By the way, the statement `list[N] = (rand()%10000)+100; // Random number of 100 <= N … | |
Re: What's it do? Why did you post it? Are we supposed to be impressed or something? | |
Re: I would encourge a **complete** description of your qestion, with understandable examples. I for one am confused by your question. | |
Re: 1) If they give you the same value they are defined the same. 2) If they are not supposed to be the same you did something wrong that gave the same value. 3) If you load the same value into a *double* and a *long double*, why would you expect … | |
Re: >return rand()%1000000+10000; What is the maximum value `rand()` will return? What is the remainder of *that value* and %1000000 ? | |
Re: Since I don't feel like trying to understand exactly how your program works, here's a general explanation: Assuming you are pointing at your first node, and START points at the first node: Get the NEXT pointer. Load START with that pointer. Delete the current node. | |
Re: Given the lack of info in the description, I assume the program is menu driven. In other words, you just execute the menu commands after initialization in this order: arrivals? add add arrivals? full? check add add full? check Is that about it? > I need some help getting started … | |
Re: Include the file *name.p* (a text file) that's in the *name* directory into the code. | |
Re: So what's not working right? How can you tell? when asking for help, you must tell us what's going on, not just say "*it doesn't work*". There are hundreds of ways it can fail. Which one is yours? | |
Re: [Certainly](http://lmgtfy.com/?q=polynomial+manipulation+linked+list) | |
Re: Why did you start a NEW thread? And why did you ignore [this help](http://www.daniweb.com/software-development/cpp/threads/435935/help-with-assignment.-almost-done-class-array-members#post1872437)? | |
Re: When you input, is the ENTER you press added to the end of the string? Better check. | |
Re: I appreciate that you are one of the very few people that comment the code but 1) your excessively long lines with comments make your logic hard to follow 2) most of your comments are meaningless. For example: `using namespace std; // Declares that we will be using the namespace … | |
Re: Line 74 is an open brace in `void mainscreen()`. You obviously haven't learned how to format your code yet. Please take a look [at this](http://www.gidnetwork.com/b-38.html) and format your code properly so it can be followed. Many errors can be found in seconds with properly formatted code. | |
Re: You caluclate the remainder. You push the remainder on the stack. You convert the remainder to a letter. What do you print? Is it the value on the stack or the one you converted? | |
Re: Gee. Sorry to hear that. Maybe it's on line 38. That looks suspicious. | |
Re: Kool. Let us know how it goes... | |
Re: > NathanOliver: Im surprised I havent seen him yet. Surprise!!!! > deceptikon: Hmm, does this mean that Walt is the new Narue? Before it was always Narue's sharp tongue that everyone feared. ;) Nyahhhh, I just didn't get logged in for a while. I thought it was 48 hour befor … | |
Re: Why are you passing the variable (note: *variable*) `student_name` into the `.getName` method? Shouldn't the parameter list be `void`? And, because `.get` methods generally return the internal value stored in the class, shouldn't your method be called `.inputName()`? Just a thought. | |
We cannot copy and quote posts that contain tagged code without removing all indentation. Makes quoting code useless and difficult, unless there is a *user friendly way we should know via mental osmosis* that has not yet been documented. | |
Re: As **nmaillet** implies, your loop should be only around your password test, not the entire program. | |
Re: [QUOTE=Govardhan92;1673024]Actually i am not getting how this code is working? Could anyone explain this please????[/QUOTE] Then you need to study harder. The code is easy to follow. Use pencil and paper to follow what it's doing -- kinda like in your math class. | |
Re: You have to be able to analyze the problem and pull out its important ideas. For example: > Issue: Your fellow students need help. This is their first year in college and Who cares. Not part of the *real* problem... >they need to determine how many hours they need to … |
The End.