5,237 Posted Topics

Member Avatar for nive

Kindly read the announcements before asking for someone to google for you. [url]http://www.daniweb.com/forums/announcement8-2.html[/url]

Member Avatar for Sturm
0
268
Member Avatar for asilter

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. …

Member Avatar for asilter
0
202
Member Avatar for asilter
Member Avatar for Salem
0
97
Member Avatar for vladdy19
Member Avatar for Tight_Coder_Ex
0
98
Member Avatar for SammyHasibi

Mmm - [url]http://cboard.cprogramming.com/showthread.php?t=93261[/url]

Member Avatar for Salem
0
104
Member Avatar for sayeo87

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" ); …

Member Avatar for sayeo87
0
278
Member Avatar for daniweb2013

[url]http://mathworld.wolfram.com/MaclaurinSeries.html[/url] Can you write either "raise to power" or "factorial" recursively?

Member Avatar for Rashakil Fol
0
446
Member Avatar for asilter

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]

Member Avatar for Salem
0
129
Member Avatar for amishosh

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]

Member Avatar for Ancient Dragon
0
79
Member Avatar for susuoi

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 …

Member Avatar for happygeek
0
786
Member Avatar for icetux

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]

Member Avatar for Salem
1
221
Member Avatar for amishosh

> 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?

Member Avatar for Ancient Dragon
0
245
Member Avatar for asilter

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 …

Member Avatar for asilter
0
164
Member Avatar for n.aggel

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.

Member Avatar for n.aggel
0
123
Member Avatar for asilter

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.

Member Avatar for Hamrick
0
86
Member Avatar for asilter

[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.

Member Avatar for Salem
0
99
Member Avatar for Masood Ali

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 …

Member Avatar for Salem
0
93
Member Avatar for n.aggel

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.

Member Avatar for n.aggel
0
191
Member Avatar for yanyan
Re: help

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.

Member Avatar for Salem
0
52
Member Avatar for Duki

Don't they teach simple geometry in schools any more? [url]http://mathworld.wolfram.com/RotationMatrix.html[/url]

Member Avatar for Duki
0
225
Member Avatar for palaka
Member Avatar for iamthwee
0
101
Member Avatar for Salem

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 …

Member Avatar for WaltP
0
311
Member Avatar for the_one

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 …

Member Avatar for kb.net
0
154
Member Avatar for Arctic wolf

"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 …

Member Avatar for vijayan121
0
717
Member Avatar for The Dude

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 …

Member Avatar for hbk619
1
125
Member Avatar for teddymon

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 …

Member Avatar for Salem
0
92
Member Avatar for mayuning2nd

Use a windows compiler to compile your code, and use a native windows version of the GTK library (assuming one exists).

Member Avatar for TkTkorrovi
0
167
Member Avatar for qaiser
Re: c

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]

Member Avatar for TkTkorrovi
0
110
Member Avatar for Majoni

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]

Member Avatar for Salem
0
106
Member Avatar for mpplumb
Member Avatar for mpplumb
0
134
Member Avatar for santoshmath
Member Avatar for santoshmath

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.

Member Avatar for santoshmath
0
109
Member Avatar for anvir

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) …

Member Avatar for Salem
0
145
Member Avatar for ashok_169
Member Avatar for TkTkorrovi
0
119
Member Avatar for thunderstorm98

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.

Member Avatar for Dani
0
183
Member Avatar for bappa_ayan

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.

Member Avatar for Salem
-1
125
Member Avatar for Mitchelle
Member Avatar for Ancient Dragon
0
70
Member Avatar for elle_yuyu

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 …

Member Avatar for Salem
0
110
Member Avatar for AquilesBailo

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.

Member Avatar for Ancient Dragon
0
171
Member Avatar for asilter

> *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.

Member Avatar for Hamrick
0
127
Member Avatar for ramavundela

There are plenty of projects here - [url]http://sourceforge.net/index.php[/url]

Member Avatar for TkTkorrovi
0
89
Member Avatar for ananthxp

[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.

Member Avatar for Ancient Dragon
0
103
Member Avatar for Trevora

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?

Member Avatar for Trevora
0
220
Member Avatar for amishosh

> 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.

Member Avatar for Salem
0
190
Member Avatar for prs55

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: | | | | | | | | | …

Member Avatar for Salem
0
143
Member Avatar for php111

> 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 …

Member Avatar for Ancient Dragon
0
125
Member Avatar for sainiricha

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.

Member Avatar for TkTkorrovi
0
108
Member Avatar for Elfshadow

> 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 …

Member Avatar for Ancient Dragon
0
276
Member Avatar for revenge2

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 …

Member Avatar for darkagn
0
145
Member Avatar for vikter

Perhaps show how you allocated it to begin with, then we can tell you the best way to get rid of it.

Member Avatar for vikter
0
112

The End.