789 Posted Topics
Re: [url=http://www.daniweb.com/techtalkforums/announcement8-2.html]The answer[/url] | |
Re: I think you could use freopen to do it somehow... I'm not sure that it'll work, but hopefully it'll at least be a starting point. [quote=man freopen]The freopen() function opens the file whose name is the string pointed to by path and associates the stream pointed to by stream with … | |
Re: Some people have argued that ++i yields more efficient assembly code. When I checked, they were the same. In this situation, it doesn't matter. | |
Re: There's a lot of comics these days that are really boring. When I look through the Sudnay paper I pick out only a couple... and I don't even remember all of them (but the list includes The Duplex, Foxtrot, and Sherman's Lagoon). I do read a few webcomics too... Questionable … | |
Re: Please don't make duplicate threads on the same topic, it just wastes people's time. | |
Re: Can't say that I've had problems with it before. Must be bad luck :p | |
Re: The URL was likely snipped by a mod. It's a common habit to avoid spammer links (just in case). @OP: If you're learning C++, have you already began working on your OS? Your post sounded like it was completed already. | |
Re: If this is in c++, you should look up some of the things made available in <iomanip>. The code won't be very neat, but you can eventually get it to output to pretty much any format. You might have to find out what the longest value for some columns are … | |
Re: Post what you have so far and we'll try to help you fix it up ;) | |
Re: > 1. Can I install a Ubuntu on a HDD with a Partition with 75 % 25%, and have linux on the 25% and a copy of Windows on the 75%? Yes, but it's possible that you'll have to re-install Windows. > 2. Is there any important software that I … | |
Re: If you know where you want the data, just create a global variable pointing to it. This of course assumes that you point it to a valid address, and you'll have to make sure they line up (and don't overlap) yourself. | |
Re: No, it's exactly 1024. There is technically a difference between a megabyte (1000 MB = 1 GB) and a mebibyte (1024 MiB = 1 GiB), but that would make a much larger difference. I've had the same thing happen when I create partitions too, though, so it's probably something in … | |
Re: [quote=joeprogrammer;340222]Not quite, it's [code] minimum + rand() / (RAND_MAX / (maximum - minimum) + 1 );[/code] To ensure proper distribution. :twisted: (sorry, I couldn't help it :mrgreen:)[/quote] Actually, according to [url=http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx]this very enlightening read[/url], you're all wrong... (sorry, I couldn't help it either) :mrgreen: | |
Re: Have you ever considered that this isn't the MEPIS installation forum? I realize that there's not so much talk in this particular forum, but we're not desperate for material either... | |
Re: 1) Will your multi-dimensionalism come even close to SQL in terms of speed? How do you intend to implement it? 2) How will the performance of your arrays be? Why is this a better design? 3) Why do you need file formats in a DBMS? 4) Compression and encryption will … | |
Re: I had it going once. I used grub, had it chainload the Windows boot manager, which then let me choose between XP and 2003. It was a very small hassle as I recall, but nothing particularly difficult. | |
Re: pass the pointer and the length of the array. | |
Re: If long double doesn't do it, I'm not sure. If you desperately need the precision, you could also use a 3rd party high (or arbitrary) precision library. Oh, and unless you absolutely need VC6.0, I'd recommend you upgrade to something from this millenium. There is a free version of VC … | |
Re: When you get an error with your code, please post that next time. Anyways, the error I got was that on line 19 you declare a Bev_Iterator* without having declared the class first. Put this line before the definition of the Beverage class: [code]class Bev_Iterator;[/code] There maybe be other errors, … | |
Re: [quote=WaltP;337404]Wanna bet? Ongoing challenge no one has solved yet: [I][COLOR=blue]Convert this printf() statement into [U]readable[/U] C++, output must match exactly:[/COLOR][/I] [code] int iVal = 2; int hVal= 0x0C; char *filename = "test.fil"; char *username = "juser"; float fValue = 23.8; printf("%4d 0x%02X Testfile: [%10s] user: [%-10s]\nTrial %8.2f \n", iVal, hVal, … | |
Re: Excel uses a proprietary format. Unless you know how to decode it, you won't be able to get very far. You might try exporting the excel file as a CSV or something... ![]() | |
Re: I'm thinking google would be the place to look. Don't know if you'll have much luck, Oregon Trail isn't one of those games that people tend to throw together for fun. Good luck though ;) | |
Re: How would you do it by hand? There's a variety of methods, but here's one you could try to implement: - search each row for the first letter of the word. - if the word fits horizontally, see if there's a match (both directions) - if the word fits vertically, … | |
Re: Not quite. The default access modifier makes things public only to the same package. Any class in another package will not be able to access the methods/members. | |
Re: without removing duplicates, you could just replace any spaces with a newline: [code]sed "s/ /\n/g" originalFile > outputFile[/code] This won't remove punctuation, but you could write another one to do that. *code not tested, but pretty sure it'll do the trick | |
Re: I certainly hope you don't expect us to write the code for you. Not only is it dishonest (we call it "cheating" around here), but there's no point. It's highly doubtful that you'll learn much if anything from it (don't argue, we've heard it before). Maybe you should have paid … | |
Re: Just looking at the code for display, I'm surprised it doesn't crash. [code]void doubly::display() { node *temp; temp=head; while(temp!=NULL) { cout<<temp->data<<"\t"; temp=temp->next; } cout<<"\n"; cout<<"\nnow printing in reverse order"; while(temp->prev!=NULL) { cout<<temp->data<<"\t"; temp=temp->prev; } }[/code] When you quit the first loop, temp will be NULL, as per the loop condition. … | |
Re: AFAIK, apt will leave packages there too. Not positive, but almost certain. I also recommend you look into emerge --depclean. Does what you're looking for (but not recursively I don't think... I wonder if that's being developed...). | |
Re: I tried running it and after a few small touchups (no logical changes though) it seems that you're off to a good start. Here's how it went: [code]$ ./a.out this is a line enil a si siht[/code] As you can see, it's working for single items and print_stack is fine … | |
Re: Wow, that's an impressive story. Glad to see that the law isn't above the law in that case ;) | |
Re: Try just using <iomanip>. I'm guessing that you have VC6.0 or something at school, which uses old (deprecated) headers. The standard C++ headers don't have the .h extension. Unfortunately, lots of classes still use old compilers (like VC6 which even predates the C++ standard) and make it very annoying to … | |
Re: Before I comment on this function, it should be noted that smallest and largest are not initialized when passed to determine [code] void determine ( int &smallest, int &largest) { int A; A=smallest; A=largest; while(A>=0) { [/code] Why do you set A right here? A should be the number inputted … | |
Re: How are you defining a palindrome? Obviously, it means that the string is symmetric about its middle, but how do you handle non-alphabetic characters? For instance, if you check that every char is between 'a' and 'z', you'll miss out on capital letters (easily resolved with the [inlinecode]tolower(char)[/inlinecode] function found … | |
Re: It depends on what I'm doing as to what I'll use. Also depends on the computer I'm on. For helping people on the forums here, I tend to just use gcc from the command line (and a console text editor). Really lightweight for small (e.g. single file) projects. If I … | |
Re: You'll need a bignum library. I've seen mention of the [url=http://gmplib.org/]Gnu Multiple Precision[/url] library before, so you might give that a shot. | |
Re: If you want to repair computers, an A+ would probably be suitable. If you want to repair Windows installations, probably an MCSE cert is the way to go. For Linux stuff, you could consider Red Hat's certifications, though the material won't apply universally. Other distros might also have something. For … | |
Re: [quote=Ancient Dragon;299036]>>If we confine our discussion to x86 hardware claiming a program is portable makes no such restriction, and neither do I. [/quote] I believe Evenbit's argument arose from this phrase, which implies a focus on OS rather than hardware: [quote=Ancient Dragon]If you are looking for portability between operating systems, … | |
Re: Instead of giving a book answer, I figured I'd help you help yourself: did you try it? You can learn a lot just from experimenting and seeing if something works or not. | |
Re: Computer science and software development should not be construed as the same thing. Software development deals with a process of designing and implementing a program, whereas computer science deals more with how computers work and how they can be made more efficient (this includes how to use them more efficiently). … | |
After looking at the thread on personality defects, I thought it might be interesting to see what personality types y'all have. [URL="http://www.humanmetrics.com/cgi-win/JTypes2.asp"]Here[/URL] is a relatively short version of the test. And some of you may already know your type. I'm INTJ | |
Re: You seem to be leaving out braces on your if statements. It was really easy to find with the code auto-indented. Here's a code excerpt: [code] switch (pkgType) { case 'A': if (hours > ONE ) cout << "Package A " << PRICEA << hours << cost << endl; cost … | |
Re: This thread has a duplicate in the C++ forum. I suggest this one be closed, if a mod would be so inclined. Please don't double-post in the future. ;) | |
Re: [code] m = n for i=1 to n if m is even then for j=1 to log n count++ end for end if m=m/2 end for [/code] For this one, you'll run the outer loop n times (1 to n). For a large integer n, you'll end up running the … | |
Re: dmesg will show you the last 500 or so lines from the kernel log. You can read through /var/log/messages (on any system I've been on at least) for a more verbose list (this is the file that dmesg actually parses for you). In either case, less is very handy for … | |
Re: My guess would be that t->b_num wasn't initialized properly. Mind you, this is very much a guess. I can't run your code so I can't tell for sure, and you didn't post what the exception was, but I'm assuming it's due to an improperly initialized pointer (in this case the … | |
Re: Most common distros will run on 256MB though they may be slow. Ubuntu is probably one of your better bets for a quick setup and easy to use system. You might want to look at Kubuntu as well, which is simply Ubuntu with KDE as the desktop manager (this way … | |
Re: My last words on the topic: You run the same kernel (actually, from what I can tell, you're running the one I installed a year ago; I've updated since). You use the same packages (and likely the same package manager as many other distros as well). How does that make … | |
Re: Gentoo isn't all that bad except for the compile times. If you just run [inlinecode]emerge kde[/inlinecode], it will take a while. If you've not done that yet, you might consider using the [url=http://www.gentoo.org/doc/en/kde-split-ebuilds.xml]split ebuilds[/url]. | |
Re: Only social networking site I use is Facebook, which still has a nice clean interface. I can't stand myspace pages though, they're about as bad as <marquee> and <blink>. I will admit, I'm basing that on approximately 2 page loads though (took less time to close the tab than it … | |
Re: you should just output the maximum of the two: [code]cout << "the max is " << max(firstnum, secondnum)) << endl;[/code] that said, your max function is wrong. It finds the max but should return the result. Here's a cleaner version: [code]int max(int a, int b) { if(a > b) return … |
The End.