5,237 Posted Topics
Re: [url]http://www.daniweb.com/forums/thread208279.html[/url] | |
Re: There's no such thing as an "array of bits" in C. | |
Re: Can you summarise the effect in a complete program we can try ourselves, and not just a context-free program fragment that could do anything. | |
Re: Allegro is a graphics library (so no). Try the STL instead [url]http://www.cplusplus.com/reference/stl/vector/push_back/[/url] | |
Re: Excellent idea - the bit about being different. Unfortunately, you're in a large pond of other people who can't think for themselves, even after many years of education. Just take a look at all the other "final project" threads. | |
Re: Post your code. Ask a question about that code. Don't forget to read the "how to post code" links at the top of the forum (actually, forget that, I know you're not going to do that, so it's not really worth mentioning to begin with) | |
Re: [URL="http://forums.devshed.com/python-programming-11/help-installing-pamie-628742.html"]when pamie met spamie[/URL] | |
Re: [url]http://uk.answers.yahoo.com/question/index?qid=20090719045724AAXrL40[/url] Either you ignored everything said, or you're a troll spamming other peoples questions just to get your links on the board. | |
Re: Well first I'd probably rename DisplayValue to be something more meaningful like DisplaySeconds. Then I might add [code]if ( DisplaySeconds == 60 ) { DisplaySeconds = 0; DisplayMinutes++; }[/code] I gather from your code you have a pair of 7-segment displays for displaying seconds. Do you have another pair for … | |
Re: Use a debugger Put a breakpoint at the start of isKnownWord Single step the code to follow the path it is actually taking. When it goes somewhere unexpected, you've found a bug. | |
Re: Start with something simple, like python. You'll actually get some useful things done in a fairly short time frame. It'll take 6 months of hard graft before you're in any shape to write a useful program in C. You HAVE to think of everything (and there's a lot to think … | |
Re: > int a[9000][9900]; How does the size of this compare say to the 1MB default stack size? | |
Re: > i tried but everytime it shows 0.00000 > and no other value > i tried it another way.... Look, just post some actual code, and describe what doesn't work in that particular program. Don't just post "I tried x y and z, and it didn't work". We can't help … | |
| |
Re: Because templates have to go in header files. When you say something like List<int>, it needs to know what the template expansion of that template actually looks like to be able to - declare instances of the class - call class member functions with the right params - etc It … | |
Re: Which compiler are you using? If it's something particularly old like Turbo C 2.01, then you're probably not using cmd.exe as your command interpreter, but the rather more archaic command.com. | |
Re: Why would you want to do such a thing? Better code is the answer, not sweeping the problem under the motherboard. | |
Re: [url]http://clusty.com/search?query=python+calling+c&sourceid=Mozilla-search[/url] | |
Re: > 12-bit bytes exist?or its a joke? Certain DSP chips have limited choices for different sizes of data types. [url]http://lists.xiph.org/pipermail/tremor/2004-October/001114.html[/url] This one for example has 16-bit chars. The C and C++ standards only guarantee a MINIMUM range for each data type. Assuming that it always means equal to is a … | |
Re: [url]http://clusty.com/search?query=sha1+source+code&sourceid=Mozilla-search[/url] | |
Re: Yeah, exactly 18 months too late, and exactly before you read this too :( [url]http://www.daniweb.com/forums/thread78223.html[/url] | |
Re: [URL="http://www.daniweb.com/forums/announcement118-2.html"]We only give homework help to those who show effort[/URL] Are these just empty words to you, or are you someone special deserving of free homework, where everyone else has to do it themselves? Nor is it urgent (least not to anyone else) [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] | |
Re: Yes you have to keep rebooting. Which is what makes VM's a really neat idea. [url]http://www.virtualbox.org/[/url] So far, I've run Vista, XP and Ubuntu all at the same time, and all an alt-tab away :) | |
Re: One is a language [url]http://java.sun.com/[/url] One is a framework [url]http://www.microsoft.com/net/[/url] The question it as meaningless as asking a carpenter whether a hammer or chisel is better. | |
Re: Google much? [url]http://clusty.com/search?query=processor+identification+asm+code&sourceid=Mozilla-search[/url] | |
Re: Why not - read 5 lines - do what you were going to do anyway It doesn't need a temp file to do that. | |
Re: > for (int i = 1; i < nScores; i++) In old C++, this meant [code] int i; for ( i = 1; i < nScores; i++) { } [/code] Which meant you could re-use i later on in the same scope without having to redeclare it. In new C++ … | |
Re: [code] for .... { // code // code // code } [/code] Becomes [code] void func ( void ) { // code // code // code } for .... { func(); } [/code] | |
Re: [url]http://clusty.com/search?query=knapsack+problem&sourceid=Mozilla-search[/url] | |
Re: Read beej very carefully [url]http://beej.us/guide/bgnet/output/htmlsingle/bgnet.html[/url] It has an example of how to use select. Some points to note > send(m_socket, strSend.c_str(), sz, 0); Both send() and recv() can fragment the message. There is no guarantee that if you ask to send 20 bytes that it will happen in a single … | |
Re: Even if your program doesn't "close" the file, the run-time library will, and failing that the OS will do it when the process terminates. On a hard disk, the worst that could ever happen would be lost sectors. NTFS is pretty robust against such things (extreme case is power loss, … | |
Re: > char* result; This is an uninitialised pointer! Result - you're scribbling characters all over someone else's memory - and they're not going to be happy about it. You're already using std::string, so carry on using std::string for everything else in your program. | |
Re: > I think we should just bite the bullet and go communist now. Can you point to a successful implementation of this idea which doesn't leave everyone blind, crippled and broke, but hey, we're all equal now (apart from the cushioned politico's). > is unsustainable in the long term because … | |
Re: > void main() > { char z,* texto; > fflush(stdin); > gets(texto); Wow, the unholy trinity all together in such a short sequence of code. [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044841143&id=1043284376[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1052863818&id=1043284351[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url] Worse still, you pass an UNINITIALISED pointer to gets(), so the whole thing is poisoned before you even type a single character. … ![]() | |
Re: [URL="http://www.daniweb.com/forums/post929872-2.html"]SELECT * FROM users WHERE postcount = 1 AND effort = 0%[/URL] Error - too many rows | |
Re: > You cannot give more Reputation to anuizath2007 today. <arnie> I'll be back! </arnie> | |
Re: > //class declaration left out for simplicity reasons You mean you just deleted where the problem is, and decided just to post where the problem shows up. Try again. Oh, and while we're at it, remove this ; #endif; | |
Re: > Does anybody see anything wrong with this approach or something I should do differently? 1. You should deal with the file in fixed sized blocks. Don't assume that you'll always be able to fit the file in memory in one go. 2. You only use the first letter of … | |
Re: Do you have a useful scripting language installed on your machine (perl, python, ruby, etc)? Do you have any experience in any of those languages? > but how hard is it to do it myself? Somewhere between trivial and impossible. > Can someone advise if this can be done from … | |
Re: [url]http://www.daniweb.com/forums/announcement8-3.html[/url] [url]http://www.daniweb.com/forums/thread78223.html[/url] While you're at it [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] | |
Re: Adding . to your path is an original security risk that isn't worth repeating. Joe Hacker puts a file called 'ls' in some directory and just waits for you to come along.... | |
Re: > But this code prints out the keyboard entered value instead of 0. Why is it so? Given something like [ICODE]printf( "%d %d\n", f(), g() );[/ICODE] the RESULT of g() is indeed pushed first by the standard C calling convention, there is absolutely nothing in the standard that says that … | |
Re: > The debugger stops at: Work your way back up the call stack, and work your way back through each nested function code. Examine the variables in each nested function, are they all set correctly for the current moment? Put a breakpoint at the start of the calling function, re-run … | |
Re: If you can't figure out code tags after 60+ posts, what makes you think kernel programming is for you? | |
Re: The first ++ tried to modify what p points to. Since p points to a string constant, your program dies because it tried to modify something in read-only memory. | |
Re: Build->Clean Build->Rebuild All Especially as it seems to think something exists, when it clearly doesn't. | |
Re: Read the intro threads again to find out how to use code tags. It's MORE than just [ ] | |
Re: > .c vs .cpp file If you're already making statements like "this works in C and not C++", then you really need to take a big step back and look at what it is you're trying to learn. Some half-assed c/c++ hybrid (what you're going to end up with) isn't … |
The End.