5,237 Posted Topics

Member Avatar for bilalb1
Member Avatar for tygerberg

I look forward to a time when all overt expression of religion and idolatry is treated for what it is, namely a mental illness. I also regard teaching children about religion as institutionalised child abuse. Religions would die out within a generation or two if it were not for the …

Member Avatar for Ancient Dragon
0
129
Member Avatar for Arctic wolf

> for(i=0;i<81;i++) loadfile>>save[i]; What is save ? [code] buf=(char *)GlobalAlloc(GPTR,len+5); GetDlgItemText(hwndsl, IDC_SAVELOAD, buf, len + 5); } switch(option) { case 's': if(buf==NULL) { MessageBox(hwndsl,"Please enter the file name!","Request:",MB_OK); goto endmark; } SAVE(buf); endmark:[/code] 1. You ignore return results 2. You use a pointer, THEN later on test it for NULL …

Member Avatar for Arctic wolf
0
305
Member Avatar for pokemon123

Not only does the post lack code tags, I see void main and various usage of ) and ; mangled into smilies. Oh well, better luck next time.

Member Avatar for iamthwee
0
98
Member Avatar for n.aggel
Member Avatar for amishosh

The easiest way for a single file is to type [INLINECODE]cl prog.c[/INLINECODE] at the command prompt.

Member Avatar for Tight_Coder_Ex
0
78
Member Avatar for thewizard397

> I'm looking for a good program writing tools C++ VI VI VI - the editor of the beast :D

Member Avatar for Ancient Dragon
0
116
Member Avatar for ndeniche

That's about as useful as the Campaign for the Removal of Acronyms in Programming.

Member Avatar for joshSCH
0
83
Member Avatar for NycNessyness

Remember these? Last edited by Ancient Dragon : 1 Day Ago at 22:05. Reason: add code tags Last edited by Ancient Dragon : 1 Day Ago at 05:02. Reason: add code tags -- please start using them Or what about this [url]http://www.daniweb.com/forums/announcement118-3.html[/url] Not to mention the watermark at the back …

Member Avatar for NycNessyness
0
887
Member Avatar for mypopope

Well the 5 threads at the top of the forum whose titles begin "Read Me: " would be a good place to start. > what is the latest version of C++? There is a single standard, released in 1998, generally referred to as C++98. But that only describes what a …

Member Avatar for toko
0
90
Member Avatar for khalidxa

Well that is basically how you do it. Post what you tried, provide it with an example input matrix, print the result and tell us how that differs from what you expected to see.

Member Avatar for pradeepk
0
107
Member Avatar for grii_19

I see void main() and a lack of code tags. No doubt both have been mentioned before, obviously with no impression on you.

Member Avatar for Aia
0
814
Member Avatar for Tight_Coder_Ex

No there isn't (at least not on any compilers I'm aware of). If you want to share information, use the standard parameter passing mechanisms. This is all you get [url]http://msdn2.microsoft.com/en-us/library/d9x1s805(vs.71).aspx[/url]

Member Avatar for Salem
0
121
Member Avatar for R_brahmankar

Tell us how many netiquette rules you've broken. [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url]

Member Avatar for ssharish2005
0
122
Member Avatar for C+Marshall

[url]http://www.daniweb.com/forums/announcement8-3.html[/url] In a survey of Daniweb, this link appeared 99.9% of the time - I wonder why? Probably because all the noobs are impatient dolts who can't wait to get their post onto the web, and don't give a rats ass what the resulting mess looks like. News flash - …

Member Avatar for C+Marshall
0
176
Member Avatar for acchao

> to copy over the mSEED_data.subframe to the mSEED_record.frames[x] . I use memcpy Except your code is copying the other way... Besides, the final sizeof should have been [INLINECODE]sizeof(compressed_frame)[/INLINECODE] to maximise the benefit of using the typedef. > [INLINECODE]int subframe[MAXWORDSPERFRAME];[/INLINECODE] Saying [INLINECODE]compressed_frame subframe;[/INLINECODE] would have been more in keeping with …

Member Avatar for Salem
0
634
Member Avatar for kgbalaji1980

> I need help for this C Program very urgent [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] Urgency is your problem, not mine. > please find the attachment below [url]http://www.catb.org/~esr/faqs/smart-questions.html#formats[/url] I'm not interested in even risking downloading a non-portable file format which is prone to all sorts of virus infections.

Member Avatar for Ancient Dragon
0
120
Member Avatar for letmec

Perhaps start by saying which OS you're using. Then perhaps a search. [url]http://clusty.com/search?query=USB+insert+notification+event&sourceid=Mozilla-search[/url] Basically, the OS generates the initial event, and then you hook into that in some way to do what you want to do.

Member Avatar for letmec
0
118
Member Avatar for rosemary

Can you for example open a text file and print the contents of the text file to the screen? If you can do that much, then you're prepared for the next step. If you can't, then we need to clear that bit up for you before progressing with the searching …

Member Avatar for vijayan121
0
335
Member Avatar for mastan

How many times did you press "compile" before posting it here? My guess is that you've tried to write the whole lot at once, pressed compile and got several hundred errors, panicked and posted the whole mess here for someone else to sort out. Or you just kept typing even …

Member Avatar for Salem
0
114
Member Avatar for mastan

[url]http://www.daniweb.com/forums/announcement8-2.html[/url] Sure, but first you need to - make an attempt - post what you tried - ask a proper question about what is going wrong, or what to do next. But if you insist on cheating your way through college, then perhaps this will help. [url]http://clusty.com/search?query=tic+tac+toe+source+code&sourceid=Mozilla-search[/url] Assuming you don't …

Member Avatar for mastan
0
103
Member Avatar for Ta1da

> //Creating programe to store names & display names with max of [COLOR="Red"]30[/COLOR] characters [INLINECODE]char name[6][[COLOR="Red"]20[/COLOR]];[/INLINECODE] There's the first problem. > #include <iostream.h> This is old-style C++. New C++ should use [INLINECODE]#include <iostream> using namespace std;[/INLINECODE] If your compiler doesn't like that, then you definitely need a newer compiler. > …

Member Avatar for Salem
0
1K
Member Avatar for wjyeo

I guess it's because of bugs in your code. But since we can't see the code, I guess you'll either have to post it or figure it out for yourself.

Member Avatar for Salem
0
65
Member Avatar for NewbieTJ

Here's a tip - press the preview button (go advanced) until you're sure you've got all the [B][co[b][/b]de][/code][/B] tags in the right place. Random attempts at sprinkling the various bits of tags around the place doesn't work. You can also edit your own posts as well (within a few minutes …

Member Avatar for Aia
0
99
Member Avatar for seanw

What you really have is this [code] if(inCrem == tgPlacers.size()) [COLOR="Red"] { /* The ; at the end of your if is a NO-OP */ } [/COLOR] { Anything = false; break; } [/code]

Member Avatar for seanw
0
110
Member Avatar for asilter

Given your previous posts, I'd say it's down to bugs in your code. All things being equal, what you describe might be unwise for the reasons AD states, but it certainly shouldn't segfault. Convince yourself by writing a simple program consisting only of your large array, and a simple main() …

Member Avatar for Salem
0
104
Member Avatar for danielbasten

Something wrong with search engines all of a sudden? [url]http://clusty.com/search?query=image+processing+algorithms&sourceid=Mozilla-search[/url] IMO, if you're incapable of doing your own research into image processing, you're not going to get very far once you find them.

Member Avatar for Salem
0
62
Member Avatar for krnekhelesh

That's because there's no such thing as fork() or unistd.h on your average windows box. Win32 doesn't have anything like fork() as such, see the hoops [URL="http://www.cygwin.com/cygwin-ug-net/highlights.html"]cygwin[/URL] has to go through in order to emulate it (poorly). If you're doing the typical fork() followed immediately by exec(), then using [URL="http://msdn2.microsoft.com/en-us/library/ms682425.aspx"]createProcess[/URL] …

Member Avatar for Salem
0
245
Member Avatar for asilter

For sure it is an overflow waiting to happen. You can't just invent sizes and hope that it will all work out, it won't. If you want to be sure that all your allocs are correct, then use this form. [INLINECODE]p = malloc ( num * sizeof *p );[/INLINECODE] where …

Member Avatar for Ancient Dragon
0
123
Member Avatar for zandiago

Given a series of "else if", you only ever get the first one which evaluates the true. Any other later ones which also happen to be true are skipped.

Member Avatar for zandiago
0
2K
Member Avatar for Arctic wolf

Because rand() isn't random at all perhaps? The default algorithm is very simple, something along the lines of [url]http://en.wikipedia.org/wiki/Linear_congruential_generator[/url] The first few iterations are likely to exhibit a degree of predictability which one might not expect. See also [url]http://c-faq.com/lib/notveryrand.html[/url]

Member Avatar for Bench
0
162
Member Avatar for Dij

Well you could start with this [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Then scroll up a few lines to where all the sticky threads are, in particular the one called [URL="http://www.daniweb.com/forums/thread70096.html"]C++ Books[/URL] Though if you've never programming anything at all before, then C++ is a big jump. Be prepared for a good few months of …

Member Avatar for jbennet
0
93
Member Avatar for DeathEvil

> %.10s%d sprintf() this to a temporary string first, then use printf("%60s") or whatever to print that result in the field width you've chosen.

Member Avatar for DeathEvil
0
122
Member Avatar for asilter

Your code is a catalogue of disasters! I'm amazed you've got this far to be honest. I'm sure not going to catch them all here, but rest assured this is like shooting fish in a barrel. [B]Buffer problems[/B] [INLINECODE] char * sYear = (char *) malloc(2); sYear = strncpy(sYear,sFileName+3,2);[/INLINECODE] 1. …

Member Avatar for asilter
0
130
Member Avatar for DeathEvil

Perhaps begin with a function called 'isVowel()', which returns true or false, depending on the type of letter passed to it. Then implement your own 'strcpy' like function, which makes use of isVowel()

Member Avatar for DeathEvil
0
135
Member Avatar for khalidxa

So pass two arrays to the function [code] void function( const int matrix[3][4], int result[3][4] ) [/code] So rather than trying to do something like [INLINECODE]result = function(mymat);[/INLINECODE] you do [INLINECODE]function(mymat,result);[/INLINECODE]

Member Avatar for Salem
0
174
Member Avatar for GenS

Or you could use this to walk an entire sub-tree [url]http://www.linuxmanpages.com/man3/ftw.3.php[/url]

Member Avatar for GenS
0
145
Member Avatar for anand_daksh_999
Member Avatar for asilter

> CreateHVFESection0(vpSec0); Following the call, vpSec0 will still be NULL. > vpSec0 = bitio_o_close(hSec0, nbytes); This does NOT update the variable passed as a parameter in the caller. It only updates the formal parameter copy of that variable. If you're really trying to return this result to the caller, then …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for zandiago

Well the first step is to make sure you can read the file properly before trying to do anything with the data. If the file reading produces garbage, it doesn't matter how wonderful the rest of the code is, it will still be garbage. [code] #include <fstream> #include <iostream> using …

Member Avatar for Lerner
0
416
Member Avatar for eyedea2011

It's that [URL="http://www.daniweb.com/forums/post409918-2.html"]deja vu[/URL] feeling all over again. History repeats itself, it has to, nobody listens.

Member Avatar for JRM
0
125
Member Avatar for Salem

Some people just don't get it. The water mark and the sticky thread just isn't cutting it, something more drastic is needed, like say 3 strikes and you're banned for 24 hours. Then there are a persistent minority with 10+ posts who still don't get it. And why would they …

Member Avatar for MidiMagic
0
338
Member Avatar for RohitSahni

Doesn't that rather depend on your operating system? And if that OS is a Unix/Linux type system, the current setting of your umask.

Member Avatar for Salem
0
67
Member Avatar for Masood Ali

Because dir.h is a fossil DOS header file, and your compiler is something more modern perhaps. You should be using [URL="http://msdn2.microsoft.com/en-us/library/Aa364418.aspx"]this API[/URL] and related functions for getting directory information in a win32 environment.

Member Avatar for Salem
0
128
Member Avatar for eyedea2011

Remember this? [url]http://www.daniweb.com/forums/thread84431.html[/url] Last edited by Ancient Dragon : 18 Hours Ago at 03:48. Reason: add code tags and disabled smiles in the text Last edited by WaltP : 13 Hours Ago at 08:10. Reason: Added CODE tags -- you actually typed right over how to use them when you …

Member Avatar for Ancient Dragon
0
395
Member Avatar for ivatanako

Read this [url]http://www.daniweb.com/forums/announcement125-3.html[/url] Then edit your post for readability.

Member Avatar for Ancient Dragon
0
4K
Member Avatar for hungrywolve2000

> I need all the help i can get for this projct Then what? 6 months later you're back asking for help on your first trivial work assignment? Because you got a job you didn't deserve on the back of the "aced" final year project. Final year projects are there …

Member Avatar for Salem
1
66
Member Avatar for komathana
Member Avatar for Ancient Dragon
0
145
Member Avatar for ShawnCplus

Is this the first function called from main()? Or is there a lot of other stuff which could have screwed up, and here is where you get to notice? Try the code in isolation (a simple main, this function, and not much else). Does it work? If so, then the …

Member Avatar for ShawnCplus
0
1K
Member Avatar for eyedea2011

> It says to add #include "stdafx.h" when i do that i get this error. Lemme guess, you added this to stdafx.h as well. "Hello, recursive file inclusion, WTF happened to all my disk space"

Member Avatar for Salem
0
254

The End.