6,741 Posted Topics
Re: The simple solution is to keep a counter for each vowel. When you encounter that vowel, increment the counter. Then at the end you can do something like this: [code] public void print_histogram ( char vowel, int frequency ) { System.out.print ( vowel + ": " ); while ( --frequency … | |
Re: Please [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]keep it on the site[/url]. Also, we have a [url=http://www.daniweb.com/techtalkforums/forum95.html]forum[/url] for job offers. | |
Re: >Bruce Eckel's books are WAY overrated. I disagree. Thinking in C++ volume 2 is a good book. The code is tolerably ugly, but the content is sound and useful. I actually haven't read volume 1 though, so you could be right on that one. | |
![]() | Re: >so what does that tell ya? Popular languages attract idiots like poo attracts flies? |
Re: >i need to know how to generate random integers in c++ Hmm, judging by how common this question is and how readily available the answer is, I would say that you haven't even *tried* to find an answer before coming here. | |
Re: It's been at least three months since I last looked at one of your posts, and you've learned [b]nothing[/b]. Maybe if you actually tried to write good code, it would be easier to find your many mistakes. >plz make necesaary changes in my code to make it properly run This … | |
You can tell a lot about a person from their keyboard and mouse choices. What's your favorite keyboard and mouse? Why do you like it? What kind of work do you do? My favorite mouse is the [url=http://www.logitech.com/index.cfm/products/details/US/EN,CRID=2142,CONTENTID=10715]Logitech G5[/url]. Aside from having a comfortable grip and gaming quality stats, I … | |
Re: Occurrences can be done with what's called a frequency table. It's a really cool thing, and it's really easy to implement. But, I'm not going to write your program for you, so I'll give you a frequency table that counts the occurrences of single characters and let you figure out … | |
Re: >can anyone give me a detailed importance of sun certificate for java programmer??? Anyone asking for a Java programmer will probably want them to be certified. Beyond that, it's a piece of paper and a lapel pin (if they still give you one). | |
Re: >because this homework isn't little, and this part is only a little part. Rationalize cheating however you want, but we won't spoonfeed you. | |
Re: >why is this? Microsoft is pushing their "safe" (translation: cumbersome and completely non-portable) library. You can ignore those warnings because they're stupid and do nothing but clutter up your build. There are two ways to get rid of them. First, you can do it in your project settings under the … | |
Re: >How long should we expect to wait when retrieving a record from the middle of the file? [TEX]50000 / 2 * 5 = 125000[/TEX] milliseconds without any details on what the difference is between 'interrogating' and 'retrieving', and assuming by 'middle' you really do mean the middle. ![]() | |
Re: >is Borland C++ free? It depends on the version. Borland 5.5 is free as a command line compiler, and Turbo C++ Explorer is a free compiler/IDE. >If I install it on XP, will it have any compatibility errors? No, but you will have issues with your compiler not properly supporting … | |
Re: [url=http://www.eternallyconfuzzled.com/images/Narue_desk.jpg]Full resolution[/url], enjoy. ![]() | |
Re: >I figured psuedocode would accomplish what I'm seeking. You didn't specify if this is to be in C or C++. In C, look for the strchr function. In C++, look for the find_first_of member function of the string type. | |
Re: >Can anyone confirm that it is possible Yes. Hey, I didn't have to read the rest of your post either! Imagine that... >Any suggestions, outlandish or otherwise, would be greatly appreciated. So are you really asking if it's possible or are you asking us how to do it? | |
Re: >Why destructor with ~ is used in cplus-plus coding for every constructor? ~ is the complement operator in C++, and a destructor is the complement of a constructor. The creator of the language admits that this may have been "overly clever", and I agree thoroughly, but at this point there's … | |
Re: >I would love to see how Narue answers this question. I'm completely different here than in real life. The anonymous nature of the web makes it much easier to experiment with different ways of expressing yourself without risk. | |
Re: If you don't have a legitimate way of getting that information, I can't think of any legal reason why you would need it. | |
Re: You're making a series of nested boxes. The reason you failed is because you're trying to do it all at once, probably with no prior experience solving this kind of problem. So what you need to do is simplify it down to something that you can solve. For example, create … | |
Re: >For the bottom half should I create another recursive function to print the >bottom half of the diamond and call it indirectly by the topDiamond function? You don't need to. Let's play a game. Get up from your computer and go to a nice empty spot in the room and … | |
Re: >syscall( 10, argv[i] ); This says to send the interrupt 10 (which references the unlink operation) to the system for processing. It's directly equivalent to saying [INLINECODE]unlink ( argv[i] );[/INLINECODE], which would be a much better solution: [code] #include <unistd.h> // read/write int main( int argc, char *argv[] ) { … | |
Re: Go to the last node of the first list and attach the first node of the second list to it: [code] last->next = list2; [/code] If you have a doubly linked list, make sure the back pointer is updated: [code] last->next = list2; list2->prev = last; [/code] | |
Re: >what do you think guys? Your formatting is horried, void main is incorrect, gets is an extremely bad habit, and the algorithm is broken. Let's start with the formatting. Braces are there for a reason. They tell you when a block starts and when a block ends. However, if you … | |
Re: >this works as infinite unconditional loop is'nt it? Yes. >y won't u get the error the redefinition of var x? Why would you? The variable is only defined once at any given time. It's exactly the same as if you did this: [code] while ( 1 ) { int x … | |
Re: >Can you explain me the answer or show it in C++ code? :-| What was [b]your[/b] answer? | |
Re: [url]http://beej.us/guide/bgnet/[/url] [url]http://tangentsoft.net/wskfaq/[/url] Enjoy. | |
Re: >Correct the problems one error message at a time. Starting from the top, by the way. Syntax errors higher up in the code tend to cause many errors later in the code. If you don't start at the top, you'll end up chasing phantom bugs. | |
Re: >Maybe it hasnt occurred to you that ive only been learning C for 5-6 days >give or take, in between lectures and other deadlines Unless you're embarrassed that Salem made some astute and accurate observations, I don't see what this has to do with anything. Lack of experience doesn't exempt … | |
Re: >Here is the ? >Next ? is ? is a sentence modifier. It has no meaning by itself in literature. Please spell out the word "question" for those of us that abhor useless abbreviations and shortcuts. Thanks. >My friend said that should be the parameter, but think that its the … | |
Re: >Anyone know if the 2006 version of Turbo >C++ comes with that graphics library? No, Turbo C++ 2006 is a modern development tool. graphics.h is an ancient library that only works on ancient systems. If you want to do graphics, stick to Win32 or .NET. IF you don't like the … | |
Re: >Hey if they were instructions any where i would follow them to the final dot. Sorry, but I'm calling you on that. Either you're lying, or you selectively ignore instructions so that you can whine when people correct you. The instructions are watermarked in the text editor. They're pretty hard … | |
Re: >access c++ private data members without using the " Friend" type Why is this such a common question? It's insanely stupid. | |
Re: >what undead thing would you be? What are our choices? Most people liken 'undead' to 'vampire', and there are so many definitions of a vampire that it's hard to choose them. You might end up with some inconvenient weaknesses. A lich is usually pretty badass, so I might pick that … | |
Re: >but, not naming names Examples are good for striking a point home to those who haven't experienced what you're talking about. Not naming names is a silly way to make yourself look nice when you complain about other people. >I have no Earthly clue how and why they are still … | |
Re: >can you post the code? No, because this thread is [B]two years old[/B]. | |
Re: If you're in main and not some nested function call you can simply return and the program will end. Otherwise, there's a function called exit in stdlib.h that does the same thing from anywhere in the program. Do you know how to take a string as input and compare it … | |
Re: I hope that your code isn't supposed to be valid C, because it's not. >But he wanted me to give a solution without using 2 - dimensional arrays. Well, you can do it with a frequency table, which is essentially a one dimensional array: [code=c] char FirstNonRepeated ( const char … | |
Re: 1) You need to be skilled enough to complete the project you bid on. 2) Last I checked it was almost always PayPal. 3) Probably not that much compared to a typical freelancer or salaried programmer. The price for projects will vary wildly depending on the complexity or difficulty, so … | |
Re: >Byte is not defined as 8 bits then what is it defined as? It's defined as whatever the implementation wants. The standard only specifies that sizeof ( char ) be 1, and at least 8 bits. That happens to be the most common definition of a byte, but systems other … | |
![]() | Re: If you're writing too much for the quick reply box, maybe, just maybe, you should be using the advanced reply page. :rolleyes: |
Re: >I cannot figure out why I am getting these two errors Try reading them. The first is pretty specific about what the problem is. | |
![]() | Re: >what is bioskey() An obsolete function that some old compilers support. >what does it do It sends the 16h interrupt so that you can get direct keyboard access without using inline assembly. >and how to use it? Don't. It probably won't work anymore and there are better ways to get … |
Re: >Scroll down for the answer. Translation: The answer is silly. >THE CHAIR Ding ding ding! Narue gets a cookie. :rolleyes: >Which chair do you like to recommend? I don't recommend subjective office equipment. The chairs I like may not be good for other people and vice versa. For example, people … | |
Re: >Do i need to declare another iterator to traverse the rows and another one to traverse each elements? Yes. Each row is an independent data structure, so you have no choice but to use two iterators. It's exactly the same as when you build the vector of vectors: [code] #include … | |
Re: >How will I use this? Wrap it in a class. It's much easier to use that way: [code] #include <ctime> class jsw_timer { public: typedef double diff_type; public: jsw_timer(): start ( std::clock() ), elapsed ( 0.0 ) {} public: void begin() { start = std::clock(); elapsed = 0.0; } diff_type … | |
Re: Nobody is going to do your work for you, fix your "borrowed" code for you, or be interested in attempting to help you until you read our posting guidelines and start acting smarter. Honestly, if you're so new to C# then why are you trying to do a program that's … | |
Re: >but i want to know where to turn when this has been accomplished Why? It's a ways away before you really start working on game development, and very likely that you'll find something else that you absolutely love in the interrim to change your direction. It's better to simply have … |
The End.