5,237 Posted Topics
| |
Re: Do you want to delete it because it's line 2, or because it's green? Read up on the sed command. For example sed '2d' file > newfile or sed '/green/d' file > newfile | |
Re: 123 First loop is 1 Second loop is 1*10+2 Third loop is 12*10+3 | |
Re: Different languages, and different libraries. > Is it the differnet IO library in which case which one is better? The C++ one. There are many more things to worry about than the size of an executable for a small program. Stuff which would require a lot of code (or more … | |
Re: > For better programming skills remember above priority in operators I've been doing C for 20 years, and I still can't be bothered to remember it. The same goes for a large part of the standard C library. I know what functions exist, but I don't remember parameter orders for … | |
Re: Don't cross-post [url]http://www.daniweb.com/forums/thread164409.html[/url] Try searching "ncurses tutorial" | |
Re: [code] double mysqrt ( int x ) { assert(x>=0); // code return result; } [/code] The whole point about assert is that you get to debug the code at the first detectable point of failure. Imagine this code in some large and complicated program, where the only "bug report" you … | |
Re: One is a language (and some APIs) and the other is a platform specification. It's like comparing a car you drive to work with the road you take to work. The question seems meaningless to me. Neither depends on the other for their continued success (or otherwise). You're free to … | |
![]() | Re: > i = *nums++; Well this does nothing, except to skip the first entry of the array. You lose i in the following assignment in the for loop. ![]() |
Re: Accurate? You mean a lot of people have got a line which says "you're gonna lose a shed-load of money in 2008"? How about other useless metrics, like toenail clippings and navel fluff? Just throw them on the ground, make up some mealy phrases which could mean anything, and say … | |
Re: [url]http://www.daniweb.com/forums/thread164446.html[/url] | |
Re: > boost::ref(copy),x,structNum, boost::ref(n), boost::ref(bar) My first guess would be that you're passing references to data which subsequently change while each thread is running. | |
Re: As well as some.cpp, you also have some.h Which has say extern int some(); Main.cpp then has #include "some.h" And you compile main.cpp and some.cpp together. | |
Re: > lets say if the data file is empty and there is nothing to scan i got errors Well you need to pay attention to the return result of fgets() before you do anything else. | |
Re: Or just get used to using TEXT() macros all over the place, and stop worrying about what each revision of the IDE defaults to for character encoding. UNICODE isn't going away any time soon, so you're going to have to learn to deal with it. | |
Re: First thing I would check is that all the cables are correctly seated. You may have partially unplugged the master cable whilst removing the slave, resulting in erratic behaviour. | |
Re: [url]http://www.daniweb.com/forums/thread163900.html[/url] [url]http://www.daniweb.com/forums/thread163898.html[/url] [url]http://www.daniweb.com/forums/thread162703.html[/url] Urgency is your problem, not ours. [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] [url]http://www.daniweb.com/forums/thread162832.html[/url] [url]http://www.daniweb.com/forums/thread162660.html[/url] [url]http://www.daniweb.com/forums/thread162567.html[/url] [url]http://www.daniweb.com/forums/thread162546.html[/url] "Help" is not a title. [url]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/url] Oh, and after 60 posts, you should really (that's REALLY!!!) be paying attention to the forum announcements [url]http://www.daniweb.com/forums/announcement4-3.html[/url] Now that's something URGENT you should be doing. | |
Re: > lsof |grep QuarkXP|awk '{ print $9,$10,$11,$12 ]'>/tmp/output1 1. Copy the line you used, not something typed "as you remember it". The ] breaks it. I'm not sure your awk command to print a few fields is going to work, since the default field separator is whitespace, the result isn't … | |
Re: Help, such as is available on the very website you refer to? | |
Re: Sure, you begin by reading the intro threads, and realise that we don't provide free homework on a plate. Attention on our part is the reward for effort on your part. The next step is show us what you actually know, and how you've used that to solve even some … | |
Re: [url]http://cboard.cprogramming.com/showthread.php?t=109299[/url] | |
Re: Presumably, there's a lot of back-story to this question in the form of the books you haven't read, nor the lectures you didn't attend. Your question is meaningless without some additional information. | |
Re: Does it also give you warning when you compile? > puts(restest[i]); This line should have complained. > char ***restest = NULL; Just because your function accepts a char*** means that you should declare your input parameter in the same way. In this instance, you should have done [code] char **restest … | |
Re: For $$, try [url]http://www.securstar.com/home.php[/url] For $0, try [url]http://www.truecrypt.org/[/url] | |
Re: > POLINK: fatal error: Access is denied. There's a good chance that the previous attempt at this code is still running, and that you can't overwrite a running programs' executable. Oh, and don't call main() recursively, use a loop. | |
Re: Yeah, read [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL] and don't go bumping your threads every 5 minutes. | |
Re: Splitting it up into several functions (say one to determine the sort key(s), and one to do the actual sorting) would be a start. 250+ line functions are hard to read / test / debug. | |
Re: George Best, 1973 against Liverpool - classic! | |
Re: > I thought arrays are always assigned contiguous blocks of memory. They are. As are all blocks of memory returned by malloc / calloc / realloc The link posted by death_oclock in the previous post is just a load of rubbish. They seem to think that because the OS might … | |
Re: I see 5 relationships, which is confusing you? | |
Re: [url]http://www.w3schools.com/XML/xml_encoding.asp[/url] | |
Re: Sounds a lot like an exam question on some sysadmin course. | |
There's a new "toy store" in town :) [url]http://news.yahoo.com/s/afp/20081219/sc_afp/usspaceoffbeat[/url] | |
Re: You mean the same way that browsers understand the difference between the header and content? [url]http://www.rfc-editor.org/[/url] Find the RFCs for HTTP and read. | |
Re: I'm really beginning to wonder what it is you think you're learning, or what it is you're trying to achieve. Add a program to startup by brute force [url]http://www.daniweb.com/forums/thread162281.html[/url] Start a browser looking at any hard disk [url]http://www.daniweb.com/forums/thread140662.html[/url] And now you want to fill the disk with random rubbish. Because … | |
Re: Buy a book, or search the web (or provide some evidence that you've already done those things). It's a long and complicated process, one which isn't going to be summarised in a simple reply on a message board which you can print off and keep. | |
Re: Does libpng even work with such an ancient fossil compiler like turbo c ? Consider using a compiler compatible with your OS. | |
Re: > for ( int col = 0 ; col < store.size() ; col++ ) Limit this by the size of the maze, not the size of the line. > for(int i=0;i<50;i++) Consider const int mazeWidth = 50; and use that constant in all the relevant places. How did you declare … | |
Re: You're mixing scanf() with fgets(). scanf() leaves a \n almost all of the time, then fgets() does "mmm, yummy, a \n. I'm done here". If you're going to use fgets(), use it for EVERYTHING, and then use sscanf() if you must. Or one of many ideas on flushing the input … | |
Re: Looked where? - the back of the cereal packet? - behind the sofa? Google's first hit [url]http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx[/url] | |
Re: > Move to the welcomes board? They already did that, before this one. [url]http://www.daniweb.com/forums/thread163658.html[/url] | |
Re: > I plan to distribute it and it would be a security issue if the source code got out [URL="http://www.interhack.net/people/cmcurtin/snake-oil-faq.html#SECTION00053000000000000000"]Security through obscurity isn't[/URL] If you set up a big enough target, then the secrets you hide inside your code will be found out. | |
Re: Personally, I'd be worried by how readily reversible the encryption of valuable credit card details appears to be. | |
Re: > A Jewish mother, who didn't want her name published. But in true "all are not equal" style, if someone carped on about the "religious" elements in some Jewish festival, there'd be accusations, and lawsuits and a load of other crap to deal with. | |
Re: No win32 based compiler is going to have sys/sockets. Read "[URL="http://beej.us/guide/bgnet/"]beej[/URL]" to find out how to do socket programming in win32. In particular the "Note for Windows Programmers". | |
Re: The short answer is don't use scanf - period. Whilst it does what it says just fine, cleaning up when the unexpected happens is damn hard work (as you've found). Example [code] char buff[BUFSIZ]; if ( fgets( buff, sizeof buff, stdin ) != NULL ) { int myInt; if ( … | |
Re: > int PSUP(int CONN[][3], int nnode, int nelem, int max_nnode, unsigned int array_numb) > //int PSUP(int **CONN, int nnode, int nelem, int max_nnode, unsigned int array_numb) OK, so which is it? Unlike single dimensional arrays, where you can switch the notation from int [] to int* at will, the same … | |
Re: > char NOUN[5][6] ={"noun1","noun2","noun3","noun4","noun5"}; These go in exactly ONE .c file, and without all the #ifdef stuff. > extern char NOUN[5][6]; These go in a header file, to be included in all the files which need to access NOUN. | |
Re: Sounds just like ctags [url]http://ctags.sourceforge.net/[/url] | |
Re: > 25th Aug 2007 Or perhaps the meal was cooked a long time ago. |
The End.