5,237 Posted Topics

Member Avatar for tootypegs
Member Avatar for VernonDozier
0
300
Member Avatar for jetru
Member Avatar for Salem
0
60
Member Avatar for austinslik
Member Avatar for jordanspy

Try fwrite(head Note that you're writing pointers (in the next field) directly out to disk. You need to make sure that you ignore this field when you next read the file into memory, because those pointers will be meaningless.

Member Avatar for Salem
0
81
Member Avatar for Nemes

> I am wondering if it makes sense that optimizating with a compiler change the > outcome of the solutions. Sure it can, if there are bugs or unwarranted assumptions in your code, all sorts of things can break. At -O3, your code needs to be pretty darn perfect to …

Member Avatar for Salem
0
121
Member Avatar for guitarrick
Member Avatar for michaelmac

Pretty much. But you need to post your actual code and better observations than "it doesn't work" for a better response.

Member Avatar for michaelmac
0
133
Member Avatar for silentdragoon

> while(!feof(fp)) { > if(fgets(str, 126, fp)) You can say this more succinctly with while ( fgets( str, sizeof str, fp ) != NULL ) A point to note, you don't have to adjust the buffer size when calling fgets.

Member Avatar for silentdragoon
0
155
Member Avatar for Lardmeister

> Would you have to hold the match to his mouth? Cows are female, and that's no bull :icon_lol:

Member Avatar for sneekula
0
302
Member Avatar for csteverun

Well the first thing you need to research is the [URL="http://clusty.com/search?query=wav+file+format&sourceid=Mozilla-search"]WAV file format[/URL] You'll also need to be familiar with the bitwise operators << >> & | ^ in order to pack information at the bit level.

Member Avatar for csteverun
0
153
Member Avatar for dv1r

Trying to call it before you prototype it will cause the compiler to declare it implicitly. This implicit declaration will almost certainly conflict with the actual definition you provide later on.

Member Avatar for dv1r
0
186
Member Avatar for uthnim

You can't seek() on a text file unless you use the result of a previous tell(). Because of all the line translation which happens, you can't reliably calculate the start position of any given line (except the first line obviously). Also, updating a text file one line at a time …

Member Avatar for Duoas
0
140
Member Avatar for nemoo

zhelih needs to read post [URL="http://www.daniweb.com/forums/post503250-2.html"]#2[/URL] as well. Like the bit on how to declare main, and the correct name for header files.

Member Avatar for rajatC
0
244
Member Avatar for vipul_cool16

I'm perfectly content to sit here and watch you fail actually. Here is only a subset of forums rules which you've already broken. Feel free to read them and reflect on what they're saying before you just dump your homework. [url]http://www.daniweb.com/forums/announcement8-2.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#noprivate[/url]

Member Avatar for zandiago
5
1K
Member Avatar for Karkaroff

> getch() is executed before the file is displayed.! > whats wrong? The problem is is that you're mixing methods of input and output. getch() being a low-level, compiler specific function is likely to bypass all the higher level (and probably buffered) functions. What's worse is that getch() is horribly …

Member Avatar for Karkaroff
0
310
Member Avatar for Srynx

> Please let me know if I am wrong. If you're going to have any chance of winning these arguments, you need to quote "chapter and verse" from the relevant ANSI standard, not just demonstrate what your current "foo" compiler happens to do with one specific test case. Because there's …

Member Avatar for CPLUSCPLUS
0
672
Member Avatar for cdijuste

1. Your code is C, not C++ (wrong forum) 2. Your post has nothing to do with the other posts in this old thread 3. You didn't read this - [url]http://www.daniweb.com/forums/announcement8-3.html[/url] 4. printf("%d is greater than %d\n"[COLOR="Red"][B],[/B][/COLOR] &num1, &num2); You're missing a comma 5. if (num1 =< num2) =< isn't …

Member Avatar for dubeyprateek
0
100
Member Avatar for crunchie

I saw the same thing a couple of weeks ago-ish, using Firefox, but it didn't last long enough to get worried about.

Member Avatar for MidiMagic
0
189
Member Avatar for everlast

[url]http://en.wikipedia.org/wiki/List_of_widget_toolkits[/url] There are a number of cross-platform GUI toolkits.

Member Avatar for everlast
0
109
Member Avatar for xeption12

For sure you need a compiler which actually matches your OS, and doesn't just live inside the DOS emulation layer of your OS. > I have Intel Core 2 Quad Q6600 2.4 Ghz processor Yes, and despite all that, all that your programs will ever see of that machine is …

Member Avatar for xeption12
0
152
Member Avatar for mgdesmond13
Member Avatar for mgdesmond13
0
93
Member Avatar for sneekula

I no longer watch broadcast TV 'live', but instead record everything I want to watch on a PVR. Man, gotta love the 30x fast forward feature to blast over all the boring bits. Efficient too, I can get 2 hours of broadcast time down to just over 90 mins of …

Member Avatar for Serunson
0
153
Member Avatar for jcstier

> Did you find any solution yet? Did you bother to check the post dates?

Member Avatar for Salem
0
757
Member Avatar for Archimag

> void main() This is wrong, main returns int. [url]http://c-faq.com/ansi/voidmain.html[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044841143&id=1043284376[/url] > gets() [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url] And while I'm on a roll, try this as well [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] The real problem is you're mixing scanf() with gets() (ugh!!!) and getchar() If you mix and match, as you're doing, then you'll come unstuck. The …

Member Avatar for n.aggel
0
122
Member Avatar for guy40az

> the compiler just hangs there without any response. The compiler is all done if you've got an a.out file. If that isn't responding, it can only be your source code which is at fault. You need to post some for further enlightenment.

Member Avatar for Salem
0
176
Member Avatar for Karkaroff

> also please tell me which of the comments I should remove All of them? Example: [icode]else if(in[i]=='.') //if '.' is encountered[/icode] How is that comment adding anything to the understanding? Comments which essentially repeat the syntax of the language don't add anything. Anyone reading the code could write those …

Member Avatar for Karkaroff
0
248
Member Avatar for kv79

[url]http://en.wikipedia.org/wiki/Decompiler[/url] Decompilation is like trying to get flour and eggs back from your cake. Getting "something" which might compile is fairly do-able, but the results are only something a compiler could love. It will in no way resemble the source code which was originally compiled. For example, a for loop …

Member Avatar for Jishnu
0
81
Member Avatar for pavitragupta

Got search-engine-phobia or something? [url]http://www.google.co.uk/search?q=Simplified+Data+Encryption+Standards&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a[/url]

Member Avatar for Salem
0
420
Member Avatar for sa-al

Your code is poorly indented. The variables are undeclared. The variable names are meaningless. > if(c==" ") This is meaningless in a C program, you can't compare arrays of chars like this. > /*this ode may be useful for converting a usual statemnt to poland model*/ Huh? It's the only …

Member Avatar for invisal
0
116
Member Avatar for maori

> i'am using sscanf and its working ok i think but how can i get it to ignore the " and spaces parts But you started off using C++ ? So why aren't you still using C++ APIs, like AD mentioned in post #3

Member Avatar for Ancient Dragon
0
153
Member Avatar for BalaKrish

Perhaps a better example of how the input relates to the output would help us make some suggestions. It could be binary for all I know. If you intend to store the results in memory, then the condensed output needs to be at most a few hundred MB in size …

Member Avatar for BalaKrish
0
109
Member Avatar for pprabhakar

[URL="http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Option-Summary.html#Option-Summary"]Options for GCC[/URL] [URL="http://msdn2.microsoft.com/en-us/library/9s7c9wdw(VS.80).aspx"]Options for Microsoft C++[/URL] [URL="http://dn.codegear.com/article/20997"]Options for Borland BCC32[/URL]

Member Avatar for Salem
0
231
Member Avatar for enes

You normally have two builds to choose from, "Debug" and "Release". Choose the debug build. You'll still get warnings about no labels, but those should all be in the system DLLs, but you should be able to set breakpoints etc in your own code.

Member Avatar for dubeyprateek
0
107
Member Avatar for prasath

> will someone point me the reasons why a call to malloc fails even if we have enough memory ? My guess is you're still using crusty old TurboC which is limited to 640K no matter how many GB of memory you have on your pentium powered, XP hosted machine. …

Member Avatar for dubeyprateek
0
3K
Member Avatar for Quakes

> for (int i = 1; i <= numberOfVerticies; i++) Arrays, including those you allocate, start at 0, not 1. All your examples run off the end, and no doubt end up corrupting something else. It should be [icode]for (int i = 0; i < numberOfVerticies; i++)[/icode] In your face …

Member Avatar for Quakes
0
131
Member Avatar for jobs

Do you want CProgramA to stay around to wait for CProgramB to finish? Which OS/Compiler are you using?

Member Avatar for Salem
0
241
Member Avatar for corneliu9d

1. Your printf() statements in your switches need to have a trailing \n (or a call to fflush(stdout) ) to guarantee being able to see them. 2. You should really have a default case in your switch, to catch all other possible errors.

Member Avatar for corneliu9d
0
173
Member Avatar for jimmy.rocks1
Member Avatar for Ancient Dragon
0
87
Member Avatar for Winuser

> I just do it, because it doesn't work. So post your best effort to date. Or if it's a large amount of code, create a cut-down version which specifically demonstrates the problem you're facing. Sometimes, the very act of doing this will tell you the answer. Even if it …

Member Avatar for Salem
0
83
Member Avatar for kakilang

> Can you please tell me how to solve this? Perhaps by starting your own thread, and not hijacking some thread over 2 years old.

Member Avatar for Salem
0
1K
Member Avatar for AbberLine

> Say every 5 miliseconds. Does your monitor refresh at 200Hz ? If there is no way for you to observe the effects of such a high resolution event, then what would be the point of trying it? Besides, once you get below the normal scheduling frequency of the OS …

Member Avatar for AbberLine
0
1K
Member Avatar for AbberLine

You don't need threads, just the ability to read user input without blocking. [code] do { if ( keypressed() ) { key = readKey(); handleKey(key); } moveFishes(); refreshScreen(); } while ( numFishes > 0 ); [/code]

Member Avatar for AbberLine
0
387
Member Avatar for TheBeast32

Also learn how to indent your code. It's much easier to follow the logic of your program that way (for you and for us).

Member Avatar for TheBeast32
0
108
Member Avatar for luv2die
Member Avatar for Jishnu

The simple way is to just compile the whole code, then have some kind of decision in the code, like this. [code] int main ( ) { if ( something ) { program1(); } else { program2(); } } [/code] A more complicated way would be to write each separate …

Member Avatar for Jishnu
0
356
Member Avatar for AqAbAwE

> but shows an error when i run it. Thanks for narrowing it down for us :icon_rolleyes: [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Now, how about telling us something concrete and specific (say a copy/paste of your console screen) rather than something vacuous like "an error". Have you considered the possibility that DOS was dead …

Member Avatar for Ryu
0
89
Member Avatar for jobs

You forgot to specify the true value of argv[0], namely [icode]execl("/bin/cp","/bin/cp","../data/data_.txt","../data/data.txt",(char*)0);[/icode]

Member Avatar for kv79
0
667
Member Avatar for #include<DAN.h>

> and saced them under the font that I use for output Guessing "saced" is saved, then the first thing you need to do is select that font as your output font. Having selected the font, you then need to output the correct character code which matches the saved position …

Member Avatar for Salem
0
125
Member Avatar for naveed.pasha

Goto [url]http://sourceforge.net[/url] Type "Intrusion AND Detection AND System" into the search box, and click "[URL="http://sourceforge.net/search/?type_of_search=soft&type_of_search=soft&words=Intrusion+AND+Detection+AND+System"]search[/URL]".

Member Avatar for Salem
0
586
Member Avatar for Khyaal

[url]http://www.daniweb.com/forums/announcement125-2.html[/url] "help" implies that you've done something yourself, and you've reached a point where you can go no further. For example, you can print everything, but not in colour. So post what you've achieved, so we don't waste time explaining what you already know, or leave out a whole bunch …

Member Avatar for Salem
0
78

The End.