- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 56
- Posts with Upvotes
- 43
- Upvoting Members
- 23
- Downvotes Received
- 6
- Posts with Downvotes
- 3
- Downvoting Members
- 4
Re: And what keeps you from going to the site directly? | |
Re: If there are three logic bugs in total and one's down, two are left. | |
Re: Why is it prohibited to buy a C++ book where you live? In any case, there is a fairly good book available online for free (Thinking in C++): [url]http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html[/url] | |
Re: [QUOTE]The null chars are being converted to full stops.[/QUOTE] Somehow I doubt that. Are you sure that it's not just the way the packets sniffer displays the data? It is quite common to display unprintable bytes as '.'. | |
Re: There might be more experts than you'd think. On another forum, there is an user who essentially knows the C++ standard by heart. And as far as I know, he is neither part of the C++ standard committee nor is he working for a C++ compiler vendor. I would expect … | |
Re: The basic idea is that you combine your bit sets until you have 8 bits you can write to the file. In semi-pseudo code: [CODE]uint bitsUsed=0; uint64_t combinedSet=0; [...] const uint64_t bitSetToAdd=1234; const uint bitSetLength=12; combinedSet|=bitSetToAdd<<bitsUsed; bitsUsed+=bitSetLength; while (bitsUsed>=8) { writeByteToFile(combinedSet&255); bitsUsed-=8; combinedSet>>=8; }[/CODE] Don't forget to "flush" any remaining … | |
Re: I must say that I'm surprised that this happens. I know that memory management doesn't always return the pages to the OS immediately, but it seems that even if you create and delete 1 GB+ worth of objects, the memory is not returned to the OS, even after some time … | |
Re: I'd like to point out that the OP is a troll who is just repeating the same procedure that he already went through on other forums using various names. He's just testing how far he can push people before he finally gets banned. If you look at his other threads, … | |
Re: You give them every last detail of gameplay and the design of the interface. They'll need to know what your game world can contain, how the player can interact with it and any characters in it (such as talking, fighting). Each topic requires you to go more in-depth, so if … | |
Re: As far as I'm concerned, your code has a much more serious issue... the following: [CODE] if (pixel[0] == 255) { if (pixel[1] == 255) { if (pixel[2] == 255) { return false; } else { return true; } } else { return true; } } else { return true; … | |
Re: Why the unnecessary restrictions? Besides the linked list, you won't get around using all of these anyway and using a linked list should depend on whether a particular implementation you had in mind actually needs it. Aside from that, it's not really that much of a challenge and especially not … | |
Re: Counter-question: why can you watch YouTube videos without any problems even though you do not have a 210 mbps connection? The answer is the same in both cases. | |
Re: [CODE]string playerName[SIZE]; int score[SIZE];[/CODE] You also should look up vectors. The above both incurs an unnecessary limitation on the number of objects you can have and in most cases, it just creates lots of instances that are never actually used. | |
Re: @Nandomo You still allocate the int variables dynamically, for which there is no reason. If you find yourself writing the keyword new, you generally should stop and try to find good reasons why you [i]need[/i] to use new. If you can't, you shouldn't use it. Doubly so when you find … | |
Re: Dev-C++ is outdated, you should use a different IDE (such as Code::Blocks). As for graphical libraries, SFML would be your best bet (assuming you're talking about 2D graphics). SDL is also popular, however it is a C library (of course, you can still use C libraries with C++ if you … | |
Re: This assignment sounds very familiar... anyway, why do you think you need to change the function? std::string overloads operators <, == and >, so it should work without any changes. Do you have to implement the sorting algorithm yourself? If not, a [code]sort(name,name+SIZE);[/code] does the trick (needs the header algorithm). | |
Re: The easiest way to do this is to write a program that takes a problem as the input and gives the source code of the solution... then you can use it to solve this problem. Seriously though, what kind of algorithm? Don't say "any"! | |
Re: [QUOTE=Supriyo;1262305]Can a standalone programmer design large scale C++ projects?[/QUOTE] In theory, if said programmer is very experienced. However, experience does not come by learning "good coding style rules" by heart. | |
Re: [ICODE]return 0;[/ICODE] might be a good idea, no? That requires you to fix the return type of function, though. And you need to fix the the return type of main too, because it always must be int anyway. | |
Re: [QUOTE=;][/QUOTE] Also, please use std::string and std::swap - this is the C++ forum after all. | |
Re: [QUOTE=;][/QUOTE] This page has what you need to know about ar archives: [url]http://en.wikipedia.org/wiki/Ar_%28Unix%29[/url] Start by extracting the three files from the .deb. Then you can proceed with the important part, i.e. extracting the desired file(s) from the data archive. | |
Re: This form of compression is called run-length encoding. However, it performs quite poorly for most types of data. Instead, you should look if any substrings already occurred earlier in the text and save a offset/size pair if they have. This is the general idea many popular compression algorithms are based … | |
Re: The relevant part of the C standard is in 5.1.2.2.1: [QUOTE]The function called at program startup is named main. The implementation declares no prototype for this function. It shall be defined with a return type of int [/QUOTE] C does not have inheritance, so obviously there is no dynamic_cast either. … | |
Re: It should be: [CODE]if(beginMinute + durationMinute >= 60)++endHour, endMinute = (beginMinute + durationMinute)%60; [/CODE] | |
Re: You're meant to only access the top element of a stack, so std::stack provides no way to iterate over its elements. But you could keep removing elements from the stack until you find the value you're looking for or the stack is empty, then push all elements back on the … | |
Re: You definitely need to rethink your usage of classes - that's not how they were meant to be used. They are supposed to represent (conceptual) object classes and thus the instances should represent certain objects. But: what is a "dead"? And what is an "alive"? | |
Re: There is no difference, except that you connect to the remote IP address instead of your own. | |
Re: The error message says it all. ApplyRoll expects seven arguments, but you're just passing one. |