Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
85% Quality Score
Upvotes Received
6
Posts with Upvotes
5
Upvoting Members
6
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
4 Commented Posts
0 Endorsements
Ranked #864
~80.5K People Reached
Favorite Tags

143 Posted Topics

Member Avatar for winbatch

There's probably a function or set of functions that do what you want, but nothing in the standard library. It would be easier to just do it manually since the algorithm isn't that hard.

Member Avatar for Reverend Jim
1
9K
Member Avatar for allomeen

You can omit the array size for the first dimension because array names are almost always converted to a pointer to the first element, so any size information is lost. That feature only applies to the first dimension, so you have to provide size information for the second dimension because …

Member Avatar for deceptikon
1
850
Member Avatar for Phaelax

>> I guess this would be helpful No, not a bit. Your code is wrong. >> for (n=0;inp[n];n++) Assuming that n was defined somewhere, the test for imp[n] against 0 is dngerous because imp is uninitialized. There could be a null character straight away, or 5000 characters later. You're [I]really[/I] …

Member Avatar for Diego.Corso
0
27K
Member Avatar for mkcee

You're thinking too hard. :) [code] #include <cstdlib> #include <fstream> #include <iostream> #include <string> int main() { const char InputFileName[] ="in.txt"; const char OutputFileName[]="out.txt"; std::ifstream InFile(InputFileName); std::ofstream OutFile(OutputFileName); if (!InFile || !OutFile) { std::cerr << "File open failure\n"; std::exit(EXIT_FAILURE); } std::string name; int age; while (InFile >> name >> age) …

Member Avatar for nutristars
0
228
Member Avatar for preethis

Think of it this way: For each new value that's pushed onto the 'stack', you pop all of the values from queue1 onto queue2, then push the new value onto queue1. Taking a simple example, say you have queue1 with a single value, 1, and you want to push 2 …

Member Avatar for absolutely
1
536
Member Avatar for trevs234

>> Randomize(); //Required in Borland C++ How about srand instead? That's available everywhere: [code] #include <cstdlib> #include <ctime> #include <iostream> int main() { std::srand(static_cast<unsigned>(std::time(0))); // Generate 10 rolls of a 6 sided die for (int i = 0; i < 10; i++) std::cout << std::rand() % 6 + 1 << …

Member Avatar for WaltP
0
232
Member Avatar for beatleborg

Did you recently switch to a new operating system? Like from DOS to Windows XP? :rolleyes: A bunch of people try to use old ass versions of a C++ compiler and wonder why they don't work well with a latest-and-greatest OS. I think Borland's C++ compiler is up to version …

Member Avatar for Nick Evan
0
340
Member Avatar for AnnaLou

If this person has physical access to your computer, you're basically SOL. Remote attacks can be hindered with software and hardware protection, but if the attacker can walk up to your computer and turn it on then no amount of protection will keep them out if they know what they're …

Member Avatar for Regimbalm
0
97
Member Avatar for Dani

>> typedef struct Dictionary\* DictionaryRef; I don't like hiding pointers with typedef. It's confusing to readers and maintenance programmers. You would be better off just using Dictionary *. >> void delete(DictionaryRef D, int k); Deletion in a hash table isn't trivial unless you use separate chaining. However, your comment suggests …

Member Avatar for aves
0
496
Member Avatar for kevin machell
Member Avatar for Case1
0
162
Member Avatar for alone2005

operator<< doesn't need to be a friend since you only use the public interface of array in it. A non-member function only needs to be a friend if it has to have access to a classes private or protected members. [code] #include <iostream> using namespace std; template <typename T, int …

Member Avatar for farag
0
190
Member Avatar for Narue

[SIZE=4][B]Koenig Lookup[/B][/SIZE] There are three ways to use a name nested in a namespace. Making the namespace open to the current scope with a using directive: [code] using namespace std; cout << "Hello world!" << endl; [/code] Making only select names open to the current scope with a using declaration: …

Member Avatar for bector
2
8K
Member Avatar for JohnHull
Member Avatar for cmills83

The height attribute doesn't exist in any portable HTML specification. You're relying on an IE extension. A workable solution is CSS: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type="text/css"> html,body { margin:0; padding:0; height:100%; width:100%; } table.full-height { height:100%; width:100%; border:1px solid black; } </style> …

Member Avatar for MidiMagic
-1
348
Member Avatar for Electrohead

> First of all, open your C++ compiler. This assumes that you're using an IDE and not a command line based compiler. For the latter you would open a text editor, and the compiler wouldn't be invoked until after the code was written. > This code tells the program to …

Member Avatar for Narue
0
182
Member Avatar for cancer10
Member Avatar for blud
0
277
Member Avatar for indianscorpion2

Here's the mathematical way to do it. But if this is homework, your teacher is probably looking for the brute force way of doing it. I won't show you that one because half the fun is figuring things out for yourself. The other half is writing the code to do …

Member Avatar for Nick Evan
0
563
Member Avatar for roryt

So you want a fixed, non-repeating image, that changes size when the browser window is resized? I don't think you can do that with portable CSS.

Member Avatar for Rhyan
0
200
Member Avatar for servertweak
Member Avatar for Killer_Typo
0
141
Member Avatar for ljCharlie

Generally, if your description of the functionality relies on the word 'if', you probably need some form of conditional, which CSS doesn't natively provide. You're looking at a PHP/CSS or Javascript hack as your best option.

Member Avatar for hgltd
0
126
Member Avatar for cajun

The only way I can think of would be to munge the address. The problem with that is people can't click on it anymore and be able to mailto. A spam crawler can just as easily check your source as it can your page contents, so any email addresses would …

Member Avatar for FC Jamison
0
152
Member Avatar for cancer10

>> How do they make tables with only CSS without using HTML Tables? Well, if you need a table, you need a table. But you can do typical table layout stuff with CSS pretty easily. Just make good use of divs. >> is it possible to make a table as …

Member Avatar for babyboy808
0
143
Member Avatar for jamshid

>> I mean like the PYTHON , you can see a nice topic ( Starting Python) in this site , i mean like that . A good tutorial is hard to write. It takes a lot of time, and the people who know enough to write a good tutorial probably …

Member Avatar for ~s.o.s~
0
254
Member Avatar for joshilay

>> which of the above methods is better in implementing ..... It depends. >> what are the advantages of recursion over iterative methods ?? [url]http://www.stanford.edu/~blp/writings/clc/recursion-vs-iteration.html[/url]

Member Avatar for joshilay
0
154
Member Avatar for Mikeytrooper

>I wanted to know how I should go about designing the webpage. Design and implementation are different. Start by deciding what you want your site to accomplish. Look at sites that do the same thing and try to get a feel for what kind of user features you need or …

Member Avatar for Dogtree
0
153
Member Avatar for ~s.o.s~

So you deliberately break the type system and then wonder why it doesn't work? :) What were you expecting to happen?

Member Avatar for ~s.o.s~
0
162
Member Avatar for rdubey_jsr

What's the extent of your CSV format? Is it just a bunch of fields separated by commas, or can the fields contain commas as well? A full CSV format means you need to do some tricky quotation parsing if a field needs an embedded comma.

Member Avatar for rdubey_jsr
0
4K
Member Avatar for gampalu

It's just what the error says. You can't have that particular debugging switch active when optimizing for speed. Under your project settings, the general tab in C/C++, you can change Debug Information Format to disabled.

Member Avatar for hollystyles
0
205
Member Avatar for gpta_varun
Member Avatar for goldeagle2005
1
289
Member Avatar for epsos

Where to start depends on what you want to do. To have a fairly broad range of marketable skills, you should be comfortable with C, C++, Java, Perl, SQL, PHP, and Visual Basic. My personal belief is that everyone should know C, and that it should be the first, or …

Member Avatar for nufanvandal
0
159
Member Avatar for Dogtree

Kinda sorta. My company had an office in New Orleans, but thankfully none of the equipment I'm in charge of was drenched (no one was hurt either, so I'm not being callous). I do have the issue of recovering it for use elsewhere though. My primary concern is disease. The …

Member Avatar for chrisranjana
0
131
Member Avatar for bucwyld

I've already posted a review in the Geek's Lounge. >> but it was cheaper for me to make it ratheer than hire a pro Clearly you're looking at the wrong pros. ;) My own Dogtree Studios provides high quality design for pocket change. Compared to just about any other development …

Member Avatar for alanpgh
0
190
Member Avatar for bryj3

The last post was 05-11-2004 06:51 PM, over a year ago. Somehow I don't think bryj3 will have saved the code, even if he still hangs around here and sees your post.

Member Avatar for Twin6g72Turbo
0
1K
Member Avatar for Gink

You can format just one partition as far as I know, so yea, assuming your D: drive isn't the CD-ROM drive, you should be able to format it and leave C: untouched. But I can't emphasize enough that getting a separate hard drive for your first Linux install is easier …

Member Avatar for kccomputerdr
0
206
Member Avatar for Gink

A good starter distro is Knoppix on Live CD or Mandrake Move. If you want to actually install Linux on your system then Mandrake is probably the easiest to do. Concerning development tools, that's not really an issue. Just look for a distro that makes it easy to add new …

Member Avatar for jindalarpan
0
162
Member Avatar for james_hartt

$60 will get you a four port switch. Even less for a hub. You don't need a full blown router to do the job.

Member Avatar for DMR
0
332
Member Avatar for mmiikkee12

A small portion of the OS would need to be written in assembly, beyond that it's theoretically possible to use Java, though I'm not sure if it's been attempted.

Member Avatar for Sauce
0
692
Member Avatar for Kimmy

This has nothing to do with C or C++. Try posting in the Windows help forum. You'll probably get better answers than we could provide.

Member Avatar for djrivera1
0
134
Member Avatar for shahid

> Please some one write this program No. If you're too lazy to do it then you deserve a failing grade.

Member Avatar for alc6379
0
151
Member Avatar for GR Web FX

One word: Javascript. A quick google search will give you something like [url=http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_65.html]this[/url].

Member Avatar for GR Web FX
1
121
Member Avatar for JoBe

1) No, a structure's members are public by default, so anyone can access them. Dave put the structure in main to limit its scope to main. Consider this: [code] int main() { struct test {}; test t; // Okay, test visible } int foo() { test t; // Error! test …

Member Avatar for JoBe
0
586
Member Avatar for NejiHyuuga

To count the number of words, just count spans of whitespace. Each span of whitespace separates a word. To count the number of sentences, look for punctuation.

Member Avatar for Dogtree
0
155
Member Avatar for cmills83

As one would expect, the page will look funky if you try to create a fluid layout and then shrink the viewing area so that it's smaller than the collective width of your images. There's really no solution except to assume a minimum width and design for it.

Member Avatar for cmills83
0
159
Member Avatar for johnson9000

> Which approach below is faster? Generally, if you're working through a pointer, there's an extra level of indirection. Therefore, in theory, going indirectly though a pointer is slower. In reality, [i]if[/i] the compiler doesn't optimize the difference away, it'll be infintesimally small. So you should use whatever more clearly …

Member Avatar for johnson9000
0
149
Member Avatar for unirs_1972

> Can you please provide me with examples of when and how copy constructors are used.. The simplest example is passing an object by value: [code] class C {}; void foo(C obj); // C's copy constructor is called [/code]

Member Avatar for e215774
0
127
Member Avatar for simplex85

> why is this more elegant? C-style I/O doesn't recognize the std::string class, so you end up having to jump through error prone hoops to get it to work, or you need to use C-style strings, which are inherently error prone. That alone is reason to use iostreams. If you …

Member Avatar for kreitcher
0
358
Member Avatar for komalac

Start a new thread, dude. It's bad form to bring an old thread back from the dead.

Member Avatar for Dave Sinkula
-1
245
Member Avatar for NejiHyuuga

> and I dont have a complier I suggest you get one, because your code will not compile. Or at the very least, you can test drive Comeau [url=http://www.comeaucomputing.com/tryitout/]here[/url] to see what the errors would be.

Member Avatar for Dogtree
0
133
Member Avatar for jules213

1) You're using the margin:auto trick, right? IE can have issues with that, especially older versions. Though the site looks fine for me in IE6. A common hack to fix that is to use text-align:center on the box rather than the text. 2) If you want to use CSS for …

Member Avatar for Dogtree
0
87
Member Avatar for Jeannie

Dude, this thread is well over a year old. Next time, if you have a new question, start a new thread. To save an array to file, just open the file, then loop over the array and write each element in turn: [code] #include <fstream> int main() { std::ofstream out("somefile"); …

Member Avatar for Dogtree
0
161

The End.