5,237 Posted Topics
Re: So what's wrong with a simple menu program, and a sub-directory containing all the games? | |
Re: What about other examples? Is it word-based, or character based? [code] char str1[] = "My name is John"; char str2[] = "My name also is John"; // char str1[] = "My name is John"; char str2[] = "Mya namel iss Johno"; [/code] | |
Re: What kind of web searches have revealed useful information so far? | |
Re: > I have to convert a text file (if possible a RTF File) to an image file like jpg or gif etc. Except this isn't steganography. Steganography takes an existing image, and "hides" a text file inside it. | |
Re: > will strMain become the reference for the block of memory allocated in the cc function as retVal? > If I delete[] strMain, will that be the same as freeing the memory I allocated in cc()? Yes and yes. Though you need to add a \0 to make it a … | |
Re: Does the obvious escape you? [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: Or perhaps fix b so that it's a proper \0 terminated string, then the problem goes away. | |
Re: > for (int i=0; i!=9; i++) 1. Define a constant for the size, say [ICODE]const int squareSize = 9;[/ICODE] 2. Using < is more usual for a for loop. As in [ICODE]for ( int i = 0; i < squareSize ; i++ )[/ICODE] > bool check(int num, int i, int … | |
Re: You do know that bx is a 16-bit register, and the max 16-bit value is 65535 right? | |
Re: That compilers are smarter than you perhaps? > I literally picked up asm today. Whereas the combined asm experience of all the people who wrote the compiler is probably in the 1000+ YEAR category. My bet is that they've figured out some stuff that you haven't. In particular 1. 11/5 … | |
Re: The system() call is standard, but the string you pass it is still implementation-specific. Does that mean "yes" or "no" ? | |
Re: How much code do you write before pressing compile? 10 lines? 100? 1000? Never write so much code that you can't deal with the compiler spitting it all out as a pile of crap. It's much better that you find this out early (like 2 minutes after you wrote it). … | |
Re: Too easy. Just send out 6 random numbers to every schmuck who signs up. Just occasionally, some of the numbers will win enough for the schmuck to write some glowing piece of puff which'll go right up on the web page as "proof". Like it says "can". Every other combination … | |
Re: It's always possible to "fake" something, but the OP needs to be more specific about the problem. | |
Re: There's lots of resources here - [url]http://nehe.gamedev.net/[/url] | |
Re: > else if(postqueue.front() == '+' || '-' || '*' || '/' || '^') Nope, try again. Yes it's valid code, but it sure doesn't do what you want it to do. | |
Re: Well yes, there are plenty of easier ways! Firstly, there's no need to invoke a browser just to get data from a web page. [url]http://curl.haxx.se/[/url] Second, this is basically a text processing exercise (if you discount trying to do it the really hard way by reading the screen or something). … | |
Re: You'll also need to read your book again to find out what the ^ operator really does. It isn't "raise to power of". | |
Re: Absolutely, just go for it!! | |
Re: 1. you need to cout i and n 2. you need to reset n each time around | |
Re: Have you drawn this on paper? Used symbols to represent the various angles and dimensions? Worked out the actual maths, rather than merely hacking away at some half-attempt? | |
Re: The same way you used that to load your map/vector/tree/whatever, only in reverse. | |
Re: Sure, just as soon as you've learnt how to indent code. [url]http://en.wikipedia.org/wiki/Indent_style[/url] | |
Re: So, is the "doesn't work" some kind of rounding error in the result, caused by all those floating point operations? Or is the "doesn't work" something more serious, like not running at all? | |
Re: Simple question - why do you have nearly 700 posts, and haven't figured out how to use google yet? | |
Re: Post again, when you've got actual code and actual error messages. | |
Re: > I don't understand whats wrong with my code. Part of the problem is that the person who set the homework doesn't know either. You might want to start questioning and verifying what they say from some independent sources. Both are wrong for exactly the same reason, which is that … | |
Re: [url]http://www0.us.ioccc.org/years.html#1994[/url] Check out smr.c :) | |
Re: > My lab instructor has asked me to make my own administrative tools Such as? Put a glossy GUI in front of an existing "admin" type command such as say "quota"? [url]http://www.rootr.net/man/man/quota/1[/url] | |
Re: [url]http://en.wikipedia.org/wiki/Event-driven_programming[/url] One you've got the hang of that, it's just a question of choosing your poison. [url]http://en.wikipedia.org/wiki/Widget_toolkit[/url] There are many different ways of putting together some s/w which draws windows and dialog boxes. | |
Re: [url]http://www.kernel.org/doc/man-pages/online/pages/man3/xdr_int.3.html[/url] This mentions XDR_ENCODE exactly twice. Try one of them. If that fails, try the other one. | |
Re: Just do the fork/exec. If the exec fails, print the appropriate error message. | |
Re: The only "automatic" one you get is an array of chars (called a string). Everything else, you need mastercard\b\b\b\b\b\b\b\b\b a for loop. | |
Re: The fact that passwords are recoverable in clear text from your database should be regarded as a serious (or fatal) security flaw. Ideally, you should only be storing a cryptographically secure hash of the password. | |
Re: Read the rules? why on earth should they read the rules :icon_rolleyes: [url]http://www.daniweb.com/forums/thread174371.html[/url] It didn't work when they joined, it didn't work then, why would it work now? Points for effort though... | |
Re: Don't cross-post. [url]http://cboard.cprogramming.com/showthread.php?t=112041[/url] Here's why. [url]http://www.catb.org/~esr/faqs/smart-questions.html#forum[/url] and the implied [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] | |
Re: It looks like an enhanced strtok() you might find in something like python or ruby, or some other scripting language. | |
Re: Good for you, now read these links. [url]http://www.daniweb.com/forums/announcement118-2.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#homework[/url] | |
Re: The usual approach seems to be to wait for a key press. | |
Re: Lemme guess, block B is outside your while loop. And since you didn't post the declaration of factsPtr, I'm guessing that's before the loop as well (otherwise it wouldn't compile) > factsPtr = &lineFact; Now here's the rub. When the loop exits, lineFact goes out of scope (it's localised to … | |
Re: If it were [code] int yo_os_dude_start_my_program_here_wtf ( int argc, char *argv ) { } [/code] would your question be different? Because start() was already taken. | |
The only thing that has changed is the numbers have got bigger. [url]http://www.youtube.com/watch?v=qA5faeCGg-w[/url] | |
Re: > sprintf(str,"%s%c",str,isciistream[i]); 1. Almost all C library functions have undefined behaviour when the source and destination overlap. You're reading from the string you're printing into. 2. QString temp=str; > const char *foo = temp.ascii(); If you print out the bytes of str before this, are they OK? Perhaps QString defaults … | |
Re: [url]http://www.rt.com/man/listen.2.html[/url] You ignore the return result. You're using the wrong kind of socket. Use perror() to print a meaningful error message when a library call fails. | |
Re: Something like this (untested) [code] while ( 1 ) { while ( fgets(line,size,fp)!=NULL) { // process lines } clearerr( fp ); // reset end of file flag sleep( 1 ); // wait for more lines to arrive } [/code] | |
Re: Well in the context of your follow-on question [url]http://www.daniweb.com/forums/thread173650.html[/url] the macros like S_IFDIR are meaningless. You're reading a string of characters from the input. So look at the string containing all the modes (that's the "drwxrwxrwx" thing) and make your determinations. |
The End.