- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 6
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: 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. | |
Re: 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 … | |
Re: >> 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] … | |
Re: 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) … | |
Re: 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 … | |
Re: >> 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 << … | |
Re: 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 … | |
Re: 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 … | |
Re: >> 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 … | |
Re: Are we talking about a CMOS password or an operating system password? | |
Re: 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 … | |
Re: [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: … | |
| |
Re: 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> … | |
| Re: > 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 … |
Re: Wow, leave it to Slashdot to use the most biased description possible. ;) | |
Re: 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 … | |
Re: 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. | |
Re: What bay area? There are a lot of bay areas on this planet. ;) | |
Re: 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. | |
Re: 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 … | |
Re: >> 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 … | |
Re: >> 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 … | |
Re: >> 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] | |
Re: >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 … | |
Re: So you deliberately break the type system and then wonder why it doesn't work? :) What were you expecting to happen? | |
Re: 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. | |
Re: 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. | |
Re: >> Lets test out your wit Translation: Who can search google better? ;) | |
Re: 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 … |