5,237 Posted Topics

Member Avatar for ramukneevan

Why? I mean, if it's your homework, what would the point being of handing in someone elses solution? Read the forum rules, we don't hand out free homework unless you show some effort up front.

Member Avatar for Narue
0
61
Member Avatar for hiddendragon

Create a variable called say 'highestSoFar' Compare with each element of the array, and update it if you find a bigger value.

Member Avatar for titaniumdecoy
0
2K
Member Avatar for moerpheus

Knowing how to program is far more important than being able to write a for loop in 20 different languages. Being able to construct a meaningful program in any language counts. Writing "hello world" or a bunch of typical homework assignments in many languages doesn't.

Member Avatar for moerpheus
0
147
Member Avatar for faisaly

Asked and answered already - [url]http://www.daniweb.com/forums/thread135693.html[/url] If you're not going to contribute, don't bother.

Member Avatar for Salem
0
217
Member Avatar for Epic Tissue

Sure, just use the "add with carry" instruction, and you can add as many as you like.

Member Avatar for Salem
0
106
Member Avatar for mrboolf
Member Avatar for Nemoticchigga

You also need to add the .cpp file to your project, which implements those functions (in the header file).

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

> But if don't want an array why the compiler chooses to pad the end? How is the compiler supposed to know you don't want an array of them? > why "pay" 24bytes when we can fit the whole composite struct in 20 and at the > same time respect …

Member Avatar for n.aggel
0
173
Member Avatar for hoticejin21

Maybe read about code tags. There's plenty of places where they get mentioned before you get to posting, try reading some of them.

Member Avatar for Adak
0
173
Member Avatar for DonkeyKong92
Member Avatar for DonkeyKong92
0
194
Member Avatar for fmartins

That would seem to be the way to go. FILE*'s are constructed by the C runtime library, which may necessitate you dragging in a whole lot of stuff you didn't want. If you did want it, there would seem to be little point in writing this bit in ASM.

Member Avatar for Salem
0
2K
Member Avatar for Hannahlv

> I thought I typed wrong here. What!!??? You mean that code isn't a direct copy/paste from your code editor? Because if it isn't, you're wasting everyone's time. > char* url = rtspServer->rtspURL(sms); Post that method. Are you sure that delete [] url; is valid at that point? > char* …

Member Avatar for Hannahlv
0
232
Member Avatar for ishaanarora

Read the man page for select, and concentrate on what the first parameter should be.

Member Avatar for ishaanarora
0
171
Member Avatar for xyzt

It leaks like a sieve. > delete namestr, surnamestr, addressstr; First of all, since you used [ ] in the new, you MUST use [ ] in the delete. Second, the comma operator doesn't mean "do this to all these things", it means "do it to the last thing". So …

Member Avatar for Ancient Dragon
0
133
Member Avatar for shariff089

Write them to a file. And 10000000000 may be larger than an int on your machine (it's larger than an int on mine).

Member Avatar for VernonDozier
0
128
Member Avatar for sinkingships7

> index_s1 = strlen(num_s1); What's here? - the last char of the string - or the \0

Member Avatar for sinkingships7
0
121
Member Avatar for wtf???

We just ignore people who bump their posts with pithy one-liners like "hello" or "is anyone here". [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] If you want instant feedback, join a chat room. Yes, there are other problems, but I don't feel like saying anymore just now.

Member Avatar for ctrl-alt-del
0
93
Member Avatar for Evan M

Scope perhaps? [code] if( TTF_Init() < 0 ) { return 1; } { Font thing; } TTF_Quit(); [/code] Or call another function. [code] void foo ( ) { Font thing; } int main ( ) { if( TTF_Init() < 0 ) { return 1; } foo(); TTF_Quit(); } [/code] Basically, …

Member Avatar for Evan M
0
237
Member Avatar for picass0
Member Avatar for jsantosh

[url]http://sources.redhat.com/gdb/current/onlinedocs/gdb_21.html#SEC233[/url] I'm surprised you need to do this yourself. I would expect 'load filename' in GDB to be able to do it.

Member Avatar for Salem
0
101
Member Avatar for Q8iEnG

[url]http://www.nist.gov/dads/HTML/avltree.html[/url] If you pick your root unwisely, your BST may resemble a linked list. Also consider - the cost of constructing the tree in the first place - the cost of keeping it balanced - the number of searches performed - the distribution of search results. You need the whole …

Member Avatar for Q8iEnG
0
130
Member Avatar for zubermohammad

Did you ask your tutor for some guidelines? What about your class-mates, what are they doing?

Member Avatar for Salem
0
105
Member Avatar for Pim

Of course you can do this with C. What you need is a graphical API and you're set.

Member Avatar for Wiki_Tiki
0
159
Member Avatar for FTProtocol
Member Avatar for ravjot28

Yes, that's about the size and shape of it. If you want it quicker, store it in memory. If you want it quicker, sort it and use a binary search.

Member Avatar for Salem
0
85
Member Avatar for Salem
Member Avatar for nav33n
0
84
Member Avatar for rishabh2011

> Every year the organization for which I work sells 30 to 45 million dollars worth of timber. > This timber is inventoried and tallied using data recorders running my various DOS > PowerBASIC, QuickBasic or C programs. So its a pretty healthy corpse I'd say. Maybe so, but are …

Member Avatar for Frederick2
0
178
Member Avatar for harry pottervs

Well did you take account of the fact that usleep takes MICROSECONDS? delay(1000); and usleep(1000); will wait for different times.

Member Avatar for harry pottervs
0
199
Member Avatar for fddrummer06

[url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url] Test the result of the read operation. EOF is a state set after the event, not a prediction of the future. Eg.[ICODE] while ( fread( &hardware, sizeof( struct hardwareData ), 1, readPtr ) == 1 )[/ICODE]

Member Avatar for fddrummer06
0
125
Member Avatar for zubermohammad

What you haven't said (or shown) is what you've attempted to do yourself. See the intro threads.

Member Avatar for Salem
0
83
Member Avatar for Leena das

Is it that time again? Lemme guess some other exclusions - puts - putchar - write

Member Avatar for ArkM
0
76
Member Avatar for grindan
Member Avatar for nitrousjames

Quit sniffing the nitrous would be a start. [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url]

Member Avatar for Salem
0
111
Member Avatar for kunalcrazycoder

[url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Camel Case

Member Avatar for Salem
0
71
Member Avatar for pdk123
Re: help

Your analysis is correct. But whether there is anything 'wrong' depends on what it's supposed to do. If for example is was a test to see if a number was >= 8, then it would fail miserably on negative numbers. The name 'new' certainly doesn't help.

Member Avatar for Prabakar
0
193
Member Avatar for sambafriends
Member Avatar for Nick1979

Here's a little game we really don't like playing. It's called "guess the operating system".

Member Avatar for smellyfis
0
169
Member Avatar for sambafriends

Here's a procedure [code] if ( firstPostFailed ) { [URL="http://www.daniweb.com/forums/thread134416.html"]tryAgain();[/URL] } [/code]

Member Avatar for CoolGamer48
0
143
Member Avatar for stewie griffin

There's no such thing as a "few lines" when it comes to graphics. For a start, each OS/Compiler does it differently, so how about telling us what you have?

Member Avatar for stewie griffin
0
160
Member Avatar for SHWOO
Member Avatar for originaldaemon

Well you could read the intro threads (there are plenty of opportunities, and you missed all of them. So much for paying attention) which tell you about code tags.

Member Avatar for Salem
0
99
Member Avatar for jbrobosa

How are we supposed to suggest things when we know nothing about - what you actually know - what courses you've been on - what your interests are. No wait, this is another one of those "maximum marks for minimum effort" type posts isn't it. Check out the endless litany …

Member Avatar for Salem
0
54
Member Avatar for loctan

> Can you offer any other interesting metrics to collect? The total number of revisions (across all the branches) divided by the age of the file. Use it to find files which are being edited rather more often than they should. This could indicate sloppy design, poor testing, vague requirements …

Member Avatar for sujith.it
0
180
Member Avatar for KingsWeBe

> BUT since my ultimate goal is to work for a software development company that makes NON-web-based products, Learn COBOL then. 1. There's billons of lines of code out there, and more being added by the year. It just isn't going to get replaced overnight. 2. It's very unfashionable at …

Member Avatar for sarehu
0
180
Member Avatar for Niner710
Member Avatar for Salem
0
355
Member Avatar for TheBuzzer

> So am I getting screwed or are most programming jobs like this? Yes and Yes (possibly). Nobody has a clue what they want, so requirements change all the time. Also, requirements change because the rest of the world keeps moving as well. As for the time frame, I'd say …

Member Avatar for iDeveloper
0
153
Member Avatar for Shadoninja

Compare [ICODE]char array[100]; int myStrlen ( void ); // compute length of string in global array[/ICODE] With [ICODE]int myStrlen ( const char *array ); // compute length of string in parameter array[/ICODE]

Member Avatar for Salem
0
74
Member Avatar for Rahin

So have you determined whether this is the cause or an effect? Do the threads start off with different instances, but through some other bug in your code they become the same and at that point it crashes.

Member Avatar for Salem
0
231
Member Avatar for fishwater00

> /* what is "%*s" mean? */ The * suppresses assignment. So this scans a string, but doesn't store it anywhere. Like you have hello 123 in the file, and you want to skip hello and store 123

Member Avatar for ssharish2005
0
170
Member Avatar for k2k

The End.