5,237 Posted Topics
Re: Kindly read the announcements before asking for someone to google for you. [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: There's something else wrong with your makefile then > $(CC) -g -c BUFR_Encoder.c $(BUFRENCODER_CFLAGS) Because the command you got, looks nothing like this gcc -I../include -c -o BUFR_Encoder.o BUFR_Encoder.c In other words, it seems you got the default .c.o make rule to turn a .c file into a .o file. … | |
Re: Make 'all' depend on the executables, not the intermediate object files. | |
Re: Look at the bit-wise operations like "AND", "OR" and "XOR". | |
Re: Mmm - [url]http://cboard.cprogramming.com/showthread.php?t=93261[/url] | |
Re: c - pc just gives you an integer (well a ptrdiff_t actually). Eg, given [INLINECODE]pc = &c[5];[/INLINECODE] then pc - c would get you back to 5 To answer your other question, look in the manual to figure out what such things as these do.[CODE]printf("%s\n", "hello" ); printf("%.4s\n", "hello" ); … | |
Re: [url]http://mathworld.wolfram.com/MaclaurinSeries.html[/url] Can you write either "raise to power" or "factorial" recursively? | |
Re: If there is any C++ in your program, then the whole thing is a C++ program, which just happens to use some C APIs [url]http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html[/url] | |
Re: The more recent Microsoft compilers default to UNICODE encoding for characters. I'm surprised this compiled without any warnings. Try something like [INLINECODE]MessageBox(NULL, [COLOR="Green"]_TEXT[/COLOR]("Hello World!"), [COLOR="Green"]_TEXT[/COLOR]("Note"), MB_OK);[/INLINECODE] | |
![]() | Re: The ! character is the default history modifier used by the bash shell (and nothing to do with perl). ! followed by all sorts of things, does all sorts of things. Eg. [INLINECODE]ls file.pl cat !$[/INLINECODE] !$ refers to the last parameter of the previous command, so this would be … |
Re: Another problem is thinking you can write a whole program at one sitting, then press "compile" right at the end. Never write more code than you're prepared to debug. [url]http://cboard.cprogramming.com/showthread.php?t=88495[/url] | |
Re: > hello all, How can I create thread in MS C 6.0. Plz tell me. Did you bother to read any of the posts in this thread AT ALL? | |
Re: So how come your compiler didn't warn you of the mis-match? Put the prototype in a header file, and include that file where you define the function, and wherever you use the function. Then you will get a warning if any declaration or use is mis-matched. Simply writing [INLINECODE]extern void … | |
Re: The reference to [INLINECODE]A[i][/INLINECODE] is made with the value of [INLINECODE]i[/INLINECODE] known in main at the time of the call. With the reference to an element of the array made, that reference remains constant for the duration of the call. | |
Re: So why not make the member of the struct to be [INLINECODE]unsigned char *data;[/INLINECODE] Then you'll be able to perform the assignment without any casting. | |
Re: [INLINECODE]gcc -I/abc/bcc/include prog.c[/INLINECODE] A long session with the [URL="http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Invoking-GCC.html#Invoking-GCC"]manual pages[/URL] would be a good idea as well. | |
Re: Well there's nothing wrong with that line, so it must be something else. My guess is that you've trashed memory somewhere else in your program, and this just happens to be where you find out. It could have crashed at any other line as well, and then no doubt you … | |
Re: Your string component matches spaces, and now you're complaining that you don't want to match spaces. You can't have it both ways. | |
Re: Most compilers have the ability to show you the generated ASM. I would suggest you study the manual for your compiler to find out how to do it. Or say which compiler you actually have, then some kind soul may tell you how to do it. | |
Re: Don't they teach simple geometry in schools any more? [url]http://mathworld.wolfram.com/RotationMatrix.html[/url] | |
Re: [URL="http://www.daniweb.com/forums/thread87942.html"]spooky[/URL] ![]() | |
I've noticed a few recent changes, which are of course somewhat annoying. 1. Sometime overnight, my option "Disable Clientside Scripting Enhancements" got reset, so this morning, everything is popping up like crazy. It's all right now, but I had to remember which box I ticked some time ago. 2. Double … | |
Re: Just in case you think there are no good reasons for anonymous remailers, consider [url]http://en.wikipedia.org/wiki/Whistle_blower[/url] It's all very well if you live in a country with reasonable protections - even then, it would be a rough ride. But in a country run by thugs, getting caught would be very bad … | |
Re: "Working" != "Bug Free". Just because it didn't crash immediately on trying [INLINECODE]printf((char *)&num);[/INLINECODE] doesn't mean that you can always get away with it. It is plainly wrong even if it didn't crash in your specific case. Your program was broken at "void main" and the rest is just mere … | |
Re: Oh how shall I measure your insignificance? Your mass (say 100kg) compared to the [URL="http://en.wikipedia.org/wiki/Mass_of_the_observable_universe"]mass of the universe[/URL] Your lifetime (say 100 years) compared to the [URL="http://en.wikipedia.org/wiki/1_E19_s_and_more"]lifetime of the universe[/URL] Man, that's a lot of leading zeros (0.0000<snore>0001%) totalling your part in it all. Do you still think that something … | |
![]() | Re: Delete the code and start again. Seriously, if you think you can write 350+ lines of code in one sitting then expect it to compile right off the bat, then you don't need a forum to help you. Writing that much code, finding yourself swamped with error messages, then dumping … |
Re: Use a windows compiler to compile your code, and use a native windows version of the GTK library (assuming one exists). | |
Re: You haven't figured out the do your own homework bit have you? [url]http://www.daniweb.com/forums/announcement118-2.html[/url] At least make some attempt, just don't dump your assignment on the board 5 minutes after your tutor gave it to you. Your choice of topic titles needs work as well. [url]http://catb.org/~esr/faqs/smart-questions.html#bespecific[/url] | |
Re: Make a copy of 0 using dup() before you close it, so that you can dup() it again to get back to it. IIRC [INLINECODE]keep = dup(0); close(0); dup(fd); // fd is now stdin close(0); dup(keep); // back to original stdin[/INLINECODE] | |
Re: [url]http://cboard.cprogramming.com/showthread.php?t=92908[/url] | |
Re: Since you read neither [url]http://www.daniweb.com/forums/thread78060.html[/url] nor [url]http://www.daniweb.com/forums/announcement118-3.html[/url] I'll be brief and mention only one of the bugs in your code. Remove [COLOR="Red"][B]"[/B][/COLOR]argv[1][COLOR="Red"][B]"[/B][/COLOR] quotes. | |
Re: According to [URL="http://www.microcontroller.com/news/microchip_pic18_40mhz.asp"]this[/URL], there is a big difference between the amount of code space and the amount of data space. Posting more specific details, like actual links to the devices you're using, and actual error messages (you don't say for example whether it was the code or data which overflowed) … | |
![]() | Re: According to another forum, it seems vibrantmedia intellitext has something to do with it. Since I have them well and truly nobbled, and have never seen this popup, there might be something to it. |
Re: Lose the "Initial Caps Writing Style" as well. [url]http://catb.org/~esr/faqs/smart-questions.html#writewell[/url] If I saw that on a CV, I couldn't get it into the bin quick enough before moving onto the next applicant. | |
Re: A few good books perhaps? [url]http://www.rafb.net/efnet_cpp/books/[/url] | |
Re: How about beginning with the basics of simply reading in the user input, then printing out what you read in. So for example, you would print [COLOR="Red"]on yyyy/mm/dd you worked from hh:mm to hh:mm [/COLOR] In the next pass through your program, you calculate hours worked from the two times … | |
Re: It's another one of those "How do I do 'x' without using the obvious API for doing 'x'" type questions which some tutors seem to find amusing. | |
Re: > *ucBufr[0] = 'B'; Or even [INLINECODE](*ucBufr)[0] = 'B';[/INLINECODE] You mean to index into where the pointer points to, not index your (pointer to a pointer), then dereference. | |
Re: There are plenty of projects here - [url]http://sourceforge.net/index.php[/url] | |
Re: [url]http://www.lvr.com/usb.htm[/url] As soon as you start messing with devices, your code becomes very unportable. With good design, you can minimise the amount of code you need to port from one machine to another. | |
Re: Also, [INLINECODE]delete I;[/INLINECODE] must be [INLINECODE]delete [COLOR="Red"][B][ ][/B][/COLOR] I;[/INLINECODE] If you're processing the file in a linear fashion, is there any real need to store the whole file in memory at the same time? | |
Re: > Why do the two compilers behave differently? Because your code invokes undefined behaviour. The assumption you made was that string constants can be modified, and they cannot. If your code is correct, then you'll get the same answer with every compiler. | |
Re: It's a sorry state of affairs if you don't know how to do addition on paper. [CODE]char a[30], b[30], c[30]; +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ a: | | | | |1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ b: | | | | | | | | | |9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|6|7|8|9| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ c: | | | | | | | | | … | |
Re: > hi, I am a beginner and haven't decided to learn how to program in C or Python If you've never programmed before, go with Python. It's a lot easier to get to grips with, and getting something working. With regard to books, check this out [url]http://www.accu.org/index.php/book_reviews?url=view.xqy?subject[/url] Avoid - books … | |
Re: Graphics invariably requires some kind of library. But to choose a library which might suit you, we need to know which operating system and compiler you're intending to use. | |
Re: > startt = clock(); The first suggestion would be to use the same API in both programs. [INLINECODE]#include <windows.h>[/INLINECODE] and [INLINECODE]unsigned long start = GetTickCount();[/INLINECODE] for example. > MINGW The second suggestion is to use a native compiler, not one which has a bloated compatibility layer to make it more … | |
Re: You're using new style C++, so you need [INLINECODE]using namespace std;[/INLINECODE] immediately after the #include line. Another way would have been to write [INLINECODE]std::cout<< "In Add(), received " << x<< "an d" <<y<< "\n";[/INLINECODE] but that can get rather verbose. > reuturn 0; Is this copy/pasted from your IDE, or … | |
Re: Perhaps show how you allocated it to begin with, then we can tell you the best way to get rid of it. |
The End.