5,237 Posted Topics

Member Avatar for zoner7

> srand((unsigned)time(0)); Run at full speed, how much time do you think is going to elapse between the first iteration and the last? Answer - not much. In other words, time() returns a constant, therefore your randomiser returns a series of constants, therefore your code always does the same thing. …

Member Avatar for zoner7
0
93
Member Avatar for gimst19

> v=(float *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(float))); > return v-nl+NR_END; Do you want to explain these? Problems include - meaningless variable names - poorly to non-existent indentation - a chaotic mix of C and C++ code.

Member Avatar for Stinomus
0
187
Member Avatar for LouieAnn

Read the rules, we don't give you code just because you managed to cobble together some buzz-words in the hope that it looks like effort.

Member Avatar for Salem
1
77
Member Avatar for anga08628
Member Avatar for payara111
0
171
Member Avatar for xiaojesus

> Account operator +(const Account &rhs,double i) Where is this, in your class, as a public function?

Member Avatar for Sky Diploma
0
89
Member Avatar for awais.abdul
Member Avatar for AirmanTheGreat
Member Avatar for Fest3er
0
126
Member Avatar for HunterFish

I assume you want to sort the data that is contained in the XML file, and not the XML file itself. Just sorting the XML makes no sense, since what you get is no longer XML.

Member Avatar for HunterFish
0
201
Member Avatar for Salem

[url]http://www.daniweb.com/forums/thread185352.html[/url] Looks 'sheared', but OK when clicked on. [attach]10118[/attach]

0
85
Member Avatar for p3truc1

[url]http://clusty.com/search?query=chatbot&sourceid=Mozilla-search[/url] How did you make it to your final year without knowing how to do this?

Member Avatar for p3truc1
0
82
Member Avatar for as_ad

Good for you. Now YOU go and read the forum rules, and post some actual effort, instead of just dumping your homework on us.

Member Avatar for as_ad
0
126
Member Avatar for waphon

All you've managed to do is post an invalid program (void main is wrong), which won't even compile (missing ; abound), and even when all that is fixed, will trash memory past the end of the array. Not to mention, NO CODE TAGS. Want a cookie?

Member Avatar for ArkM
0
170
Member Avatar for jephthah
Member Avatar for Windkessel

Piping works, if you can do this [ICODE]open -e[/ICODE] [COLOR="Green"]/path/to/file[/COLOR] That is, if you just type in the "[ICODE]open -e[/ICODE]", it gives you some kind of prompt for a filename. If it doesn't do that, then piping isn't the answer. Most things do however accept a filename on the command …

Member Avatar for Windkessel
0
138
Member Avatar for fbutler24
Member Avatar for keasub
Member Avatar for Salem
0
96
Member Avatar for SceneZx
Member Avatar for BestJewSinceJC
0
144
Member Avatar for massivefermion

Most people leave it until there's less than 12 hours to go before running round screaming URGENT (which it isn't by the way) [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] 4 days is plenty of time for you to make a stab at solving these trivial problems. Besides, you've got over 70 posts, which means you …

Member Avatar for Ancient Dragon
0
151
Member Avatar for Talguy

[url]http://www.parashift.com/c++-faq-lite/operator-overloading.html#faq-13.10[/url] And the next few entries as well.

Member Avatar for Talguy
0
108
Member Avatar for smthdeedog48

The vagueness continues [url]http://www.daniweb.com/forums/thread191291.html[/url] > Again i not asking anyone to do my work just the right push in the right direction Try asking an actual question in one of the actual support forums. [url]http://www.daniweb.com/category2.html[/url] Y'know, a post containing the following - a summary of the problem - YOUR attempt …

Member Avatar for Ancient Dragon
0
162
Member Avatar for vaps

Sure there are plenty who 'can'. 'will' on the other hand is another matter. 100K+ of source code scattered through a couple of dozen source files is a hell of a lot to ask someone else to fix for you. Especially with your "no clues" approach, like error messages, specific …

Member Avatar for vaps
0
88
Member Avatar for samarudge

[quote=man page] -R, --recursive change files and directories recursively [/quote] [url]http://www.rt.com/man/chmod.1.html[/url]

Member Avatar for samarudge
0
91
Member Avatar for sumitkamboj

This is as fast as I can manage [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url]

Member Avatar for Salem
0
56
Member Avatar for JLopeman

> cin>>stus[NUM]; Well this is outside your array. Perhaps you meant [ICODE]cin>>stus[x];[/ICODE]

Member Avatar for JLopeman
0
241
Member Avatar for l3vi

[url]http://clusty.com/search?query=data+mining&sourceid=Mozilla-search[/url]

Member Avatar for Salem
0
45
Member Avatar for saravananrmca

> I would like to reduce the processing time. To what - video frame rate? Which OS/Compiler are you using? Do you have multiple cores on your CPU? Are you using all of them?

Member Avatar for Salem
0
184
Member Avatar for dzoch89

Checking for == 6 (the actual number of conversions you expect for success) would be better than simply >0 Reading a line using fgets(), then parsing the result with sscanf() (or something better) would help as well. Partial fails of fscanf leave the input stream in a horrible mess.

Member Avatar for dzoch89
0
131
Member Avatar for CoolAtt

> printf (astr) NEVER do this! [url]http://en.wikipedia.org/wiki/Format_string_vulnerabilities[/url] The format string of printf/scanf must always be under your control, ideally in read-only memory. All someone would have to do with your code is feed it some lines with % chars, and watch the fun begin!

Member Avatar for Aia
0
5K
Member Avatar for kiske

Well read literally, you have [ICODE]tot = CLng( tot ^ !lngdata)[/ICODE] But is XOR-NOT is some new operator which is the logical inverse of XOR (like NAND is to AND), then perhaps one of these [ICODE]tot = CLng( !tot ^ !lngdata) tot = CLng( !(tot ^ lngdata) )[/ICODE] Post a …

Member Avatar for ArkM
0
244
Member Avatar for xponse

> I have noticed that void works good. Just so you know what undefined behaviour means. My program works. Your program crashes. His hard disk has been reformatted. The second thing you need to learn is that all compilers expand the language in many non-standard ways in order to make …

Member Avatar for ~s.o.s~
2
458
Member Avatar for vddmanikanta

> can you possibly be more vague? Or more repetitive ;) [url]http://www.daniweb.com/forums/thread191160.html[/url]

Member Avatar for Salem
0
65
Member Avatar for kaku_lala
Member Avatar for Adexter

> void StuRead(&ifstream studentType students[]); type name comma type name comma and so on

Member Avatar for NathanOliver
0
125
Member Avatar for Sam-J

Why jump ship in the middle of making good progress? [url]http://cboard.cprogramming.com/cplusplus-programming/115570-plzzzzzz-i-need-help-natural-merge-sort.html[/url]

Member Avatar for WaltP
0
407
Member Avatar for vmars

> that will convert Python code to 'C' code . Why? Performance reasons? As already stated, replicating a lot of the "free" functionality using your own C code is going to take work. Also, python (in common with many modern interpreted languages) is bytecode compiled before it is run. If …

Member Avatar for Nine Tails
0
12K
Member Avatar for gretty

You're given a formula, which takes 1 line of code. You've given a template which has everything except that line of code. What do YOU want?

Member Avatar for siddhant3s
0
1K
Member Avatar for NicAx64

I thought [URL="http://en.wikipedia.org/wiki/Jell-O"]jelo-C[/URL] was a new programming language in a variety of fruity flavours ;)

Member Avatar for NicAx64
0
309
Member Avatar for chrisbrandon

Ask your IT guy where the support contract for this program is placed. What kind of program is it? It seems like it's some 40 year old DOS fossil from the way you describe it. > We use a lot of paper So your process is something like - you …

Member Avatar for Salem
0
99
Member Avatar for MJFiggs

Pseudo-code [code] # is score enough to make it onto the table anyway? if ( score > table[last] ) { table[last] = score; # drop the last place in favour of the new score sort( table ); # sort to find it's true place in the table } [/code]

Member Avatar for Salem
0
71
Member Avatar for NathanOliver

52040292466647269602037015248896 That's the size of your last file - are you sure you want to do this? Y'know, some simple maths to determine whether your plan will actually yield a result in lets say the age of the universe?

Member Avatar for NathanOliver
0
89
Member Avatar for VernonDozier

Of course the best "revenge is a meal best served cold" is for the kids to turn round and put the parents in the worst possible nursing home they can find. Maybe a few lawsuits for damages would slow the trend as well.

Member Avatar for sneekula
2
485
Member Avatar for sabian4k
Member Avatar for scottyscotty19
Member Avatar for rusman
Member Avatar for Falkoner1
Member Avatar for ni30rocks
Member Avatar for boujibabe

Does your code look this neat to you? [code] do { do { system("cls"); printf("Enter the name and path of a .TXT file(type 1 to end):\n"); fflush(stdout); fgets(fname, 128, stdin); if ((s = strchr(fname, '\n')) != NULL) *s = '\0'; /* remove newline char */ fp = fopen(fname, "r"); if …

Member Avatar for jephthah
0
201
Member Avatar for gamodg

[ICODE]FILE *debug = fopen("debug.txt","a");[/ICODE] Then use fprintf() for your debug. Simple - no?

Member Avatar for Salem
0
73
Member Avatar for Sticksll

If you're trying to optimise your courses based solely on minimising the workload, then you're on the wrong course, and in the wrong place. Job interview: Q: What motivated you to choose these courses? Your A: I'm lazy, so I picked the ones with the least workload. That'll go down …

Member Avatar for ithelp
0
107
Member Avatar for stonerain

> It's a 2-D array, so it's more like an int**, not an int*. Only in as much as you can use [x][y] notation to step through them. A pointer to a 2D array is NOT the same as a pointer to a pointer. [url]http://c-faq.com/aryptr/pass2dary.html[/url] An example of actual pointers …

Member Avatar for Salem
0
1K

The End.