789 Posted Topics

Member Avatar for chikwava
Member Avatar for naya22
0
97
Member Avatar for Sebouh

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 …

Member Avatar for Infarction
0
117
Member Avatar for Tauren

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.

Member Avatar for WaltP
0
132
Member Avatar for The Dude

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 …

Member Avatar for arjunsasidharan
1
97
Member Avatar for student86

Please don't make duplicate threads on the same topic, it just wastes people's time.

Member Avatar for student86
0
93
Member Avatar for Ancient Dragon

Can't say that I've had problems with it before. Must be bad luck :p

Member Avatar for happygeek
0
81
Member Avatar for viraltaj

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.

Member Avatar for jan1024188
0
160
Member Avatar for jerryseinfeld

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 …

Member Avatar for jerryseinfeld
0
125
Member Avatar for Green Anorak
Member Avatar for DEMWilson
0
96
Member Avatar for maui_mallard

> 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 …

Member Avatar for maui_mallard
0
150
Member Avatar for techie82

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.

Member Avatar for Infarction
0
115
Member Avatar for Duki

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 …

Member Avatar for Chaky
0
111
Member Avatar for muadh jamal

[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:

Member Avatar for WaltP
0
3K
Member Avatar for mepnoob2005

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...

Member Avatar for crunchie
0
173
Member Avatar for Lance Wassing

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 …

Member Avatar for Infarction
0
204
Member Avatar for emtb422

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.

Member Avatar for John A
0
95
Member Avatar for shmay
Member Avatar for guy40az

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 …

Member Avatar for John A
0
226
Member Avatar for kevinmscs

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, …

Member Avatar for Infarction
0
98
Member Avatar for guy40az

[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, …

Member Avatar for ~s.o.s~
0
527
Member Avatar for mrjoli021

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...

Member Avatar for iamthwee
0
91
Member Avatar for manujpro

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 ;)

Member Avatar for vinod_javas
0
1K
Member Avatar for jerryseinfeld

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, …

Member Avatar for Lerner
0
192
Member Avatar for debargha

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.

Member Avatar for debargha
0
134
Member Avatar for maxcell
Re: Text

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

Member Avatar for ghostdog74
0
86
Member Avatar for anousha

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 …

Member Avatar for staneja
0
93
Member Avatar for kartik911

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. …

Member Avatar for kartik911
0
138
Member Avatar for Sturm

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...).

Member Avatar for Sturm
0
175
Member Avatar for rowly

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 …

Member Avatar for rowly
0
1K
Member Avatar for The Dude

Wow, that's an impressive story. Glad to see that the law isn't above the law in that case ;)

Member Avatar for jbarry315
0
65
Member Avatar for FlyingRedneck

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 …

Member Avatar for John A
0
103
Member Avatar for Riazansar

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 …

Member Avatar for John A
0
127
Member Avatar for confused!

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 …

Member Avatar for WaltP
0
288
Member Avatar for guy40az

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 …

Member Avatar for WaltP
0
140
Member Avatar for i_like_pi

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.

Member Avatar for i_like_pi
0
90
Member Avatar for Roxielove

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 …

Member Avatar for Infarction
0
83
Member Avatar for mattyd

[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, …

Member Avatar for bootstrap
1
261
Member Avatar for amt_muk

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.

Member Avatar for amt_muk
0
203
Member Avatar for mike4

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). …

Member Avatar for joshuatree
0
147
Member Avatar for Infarction

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

Member Avatar for N317V
0
332
Member Avatar for Amanda21

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 …

Member Avatar for Amanda21
0
110
Member Avatar for sbenware

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. ;)

Member Avatar for sbenware
0
472
Member Avatar for algo_man

[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 …

Member Avatar for Infarction
0
134
Member Avatar for jigoro

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 …

Member Avatar for Infarction
0
68
Member Avatar for mahtab

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 …

Member Avatar for Infarction
0
82
Member Avatar for ayk-retail

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 …

Member Avatar for jbennet
0
557
Member Avatar for anthonycea

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 …

Member Avatar for jbennet
0
336
Member Avatar for Marks256

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].

Member Avatar for jbennet
0
169
Member Avatar for linux

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 …

Member Avatar for christina>you
0
212
Member Avatar for nottoshabi

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 …

Member Avatar for nottoshabi
0
116

The End.