5,237 Posted Topics

Member Avatar for redrum237

Like a more specific question than "I've got problems, and here's a 3/4 Meg ZIP file for you to dig through" ?

Member Avatar for redrum237
0
63
Member Avatar for youngman_kurd

Doesn't make much sense here either [url]http://cboard.cprogramming.com/showthread.php?t=110087[/url]

Member Avatar for Salem
0
103
Member Avatar for rpg245

rand() should be pretty quick, because it is pretty simple. You might try [code] for ( i = 0 ; i < 1E7 ; i++ ) { num = 42; // was num = rand(); } [/code] Just to make sure that it's rand() which is the bottleneck, and not …

Member Avatar for Salem
0
110
Member Avatar for Awebb999

It's the same old story - [url]http://www.daniweb.com/forums/thread161400.html[/url] Try it, and find out. Otherwise, we might just start lying about the answer just to see if you'll believe everything we say, only to find yourself with a crap mark on your assignment.

Member Avatar for Salem
0
73
Member Avatar for Elsammos

> Why are you using a const PIND here? Can its value ever be changed somewhere else in your program? Since the OP mentioned a micro controller, I would say this is an alias for some memory location which maps directly to a hardware switch. > Or any othes ideas …

Member Avatar for Elsammos
0
97
Member Avatar for vlpkiranmayi

Picture if you will a young man, fresh from college with a nice degree, sitting in an interview for his first job. Things are going well, he expertly answers the simple routine questions designed to filter out the flim-flam artists. Then out of nowhere comes a tough question. "So, what …

Member Avatar for stultuske
0
352
Member Avatar for Awebb999

23 [url]http://www.daniweb.com/forums/thread161397.html[/url] 14 [url]http://www.daniweb.com/forums/thread161389.html[/url] Is this a live feed direct from my keyboard to your answer sheet without going through YOUR mind?

Member Avatar for Ancient Dragon
-1
502
Member Avatar for Awebb999

> 14. What will be outputted given the segment of code, if 11 is entered from the keyboard? Why not try it?

Member Avatar for Salem
0
179
Member Avatar for nashmage

So where's the if / else logic around your fork calls? Because I can't see how you can possibly get the output, from the code you supply. I mean [code] /* fork process one here */ fork(); pid1 = getpid(); //call process1 to increase shared memory counter process1(); fprintf(stderr,"Hello from …

Member Avatar for Salem
0
119
Member Avatar for atman

It's because scanf doesn't read a whole line. It only reads what it needs. So if you type 123\n and you remove 123 with your scanf("%d"), then that leaves the \n for something else to deal with. That something else (in your case) is scanf("%c") which reads the next char …

Member Avatar for WaltP
0
153
Member Avatar for reejuraju

My new standard answer to such questions is this. [url]http://www.daniweb.com/forums/post751726.html#post751726[/url]

Member Avatar for Salem
0
21
Member Avatar for mmeclimate

The output of [ICODE]od -Ax -t x1z /home/mmeclimate/test/test.dat[/ICODE] is my preferred way of dumping binary data in an unambiguous textual representation.

Member Avatar for mmeclimate
0
2K
Member Avatar for MaRtO

[url]http://msdn.microsoft.com/en-us/library/aa385103.aspx[/url] 1. You don't check the return result. 2. You don't check ret either 3. Your cout assumes that buffer is a \0 terminated string (it isn't).

Member Avatar for Salem
0
85
Member Avatar for hellIon

[url]http://www.daniweb.com/forums/thread159962.html[/url] Well we're not going to explain every last snippet of assembler syntax because you're too lazy to seek out some kind of reference manual.

Member Avatar for carson myers
0
169
Member Avatar for hellIon
Member Avatar for shyaamsn

Well here's some [URL="hardware"]http://en.wikipedia.org/wiki/Large_Hadron_Collider[/URL]

Member Avatar for ithelp
-1
24
Member Avatar for Birdie010
Member Avatar for sumithakb
0
82
Member Avatar for Duki

[url]http://www.tomsteyer.com/Illustrations/radar.htm[/url] Distance is how far from the centre Direction is, well I'm sure you can figure it out :)

Member Avatar for LizR
0
101
Member Avatar for Foe89
Member Avatar for Foe89
0
269
Member Avatar for cloudedvision

Why would you need a raw socket, when a regular one would work just fine? Just read "beej" and study the client/server example.

Member Avatar for Salem
0
127
Member Avatar for vikashkumar051

You mean this? [url]http://en.wikipedia.org/wiki/Polyhex_(mathematics[/url]) I'm confused by the 20 and 50 - what's that about? They're not multiples of 6.

Member Avatar for StuXYZ
0
143
Member Avatar for geffect

1. Well done on using code tags, not many 1-posters manage to do that. 2. Here is your code, indented with what I think it actually means. [code=c++] #include "TStack.h" #include <math.h> #include <stdio.h> #include <vector> using namespace std; //FILE *f=fopen("input.txt","r"); //FILE *g=fopen("output.txt","w"); void main(){ int n; scanf("%d", &n); vector …

Member Avatar for MosaicFuneral
1
99
Member Avatar for karthiknv
Member Avatar for RaDeuX
Member Avatar for Salem
0
173
Member Avatar for Vallnerik25

The first one is initialisation, the second one is assignment. Arrays cannot be assigned in either C or C++. You also need to get out of the "arrays are pointers" mode of thinking. [url]http://c-faq.com/aryptr/index.html[/url]

Member Avatar for Vallnerik25
0
189
Member Avatar for CE Student

If you can't figure out how to use code tags after 20+ posts, and people keeping on telling you about them, then I have to say that programming isn't for you. And your choice of topic titles borders on the useless as well. [url]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/url]

Member Avatar for Lerner
0
1K
Member Avatar for MC Rove

Start with [code=c++] readData(cityArr, tempArr); // getHighTemp(cityArr, tempArr); // getLowTemp(cityArr, tempArr); // calcAvgTemp(tempArr); [/code] Does it crash? How about [code=c++] readData(cityArr, tempArr); getHighTemp(cityArr, tempArr); // getLowTemp(cityArr, tempArr); // calcAvgTemp(tempArr); [/code] Maybe this [code=c++] readData(cityArr, tempArr); getHighTemp(cityArr, tempArr); getLowTemp(cityArr, tempArr); // calcAvgTemp(tempArr); [/code] Understand? Or you could use a debugger, which …

Member Avatar for vmanes
0
80
Member Avatar for watersnow14

Well it was suggested in half a dozen places that you should use code tags. But you ignored all of them, so really what would be the point in spending any more effort on a 7th or 8th attempt.

Member Avatar for AmyH2008
0
289
Member Avatar for bhoot_jb
Member Avatar for bhoot_jb
0
161
Member Avatar for tech291083

Well since you bumped a 6-month old thread just to ask a google question, try this [url]http://www.letmegooglethatforyou.com/?q=free+IDE[/url] Which in itself was bumped (uselessly) from a 16 month slumber. But then again, it is your own personal support thread, so perhaps it's OK.

Member Avatar for Salem
0
2K
Member Avatar for xlx16

> is it true that A. calloc allocates memory in contiguous bytes, malloc does not ensure contiguous memory allocation? No, it's false. calloc is nothing more than malloc + memset to wipe the memory to all-bits-zero. > i mean early intell CPUs could onley address (64K) Only 64K in a …

Member Avatar for Salem
0
371
Member Avatar for C++.java

Here's a couple of ascending orders.... [code=c++] int arr[] = { 20,-10,50,4,10,2,6 }; for ( int i = 0 ; i < 7 ; i++ ) { setvolume(i); // 0 is silence, 7 is deafening say( arr[i] ); // number to speech function } int arr[] = { 20,-10,50,4,10,2,6 }; …

Member Avatar for Salem
-1
129
Member Avatar for idontexist

Convert to a string using say sprintf(c) or stringstream(c++) Then output the string as you know how to.

Member Avatar for Salem
0
83
Member Avatar for samishunk
Member Avatar for piznut25

trip.input(); trip.set_mile(new_miles,new_fuel); The first one reads input and assigns the class member vars. The second just trashes the data with the uninitialised values in main. Just delete this line.

Member Avatar for cikara21
0
138
Member Avatar for Freaky_Chris

[url]http://docs.sun.com/app/docs/doc/800-7895/6hos0aou4?a=view[/url] Floats are approximations of an infinite number space mapped onto a finite machine. Mathematical results and computational results seldom agree. Any floating point result comes with an error margin. > As I would hate to have to swap to VC++ just to solve this problem If you count sweeping …

Member Avatar for StuXYZ
0
263
Member Avatar for NinjaLink
Member Avatar for acperson

> (Press Retry to debug the application) Do this. When the debugger starts, do something like view->stack That will tell you how the code got to that point. Somewhere through the various stack levels will be your code. Click on the first one you recognise. It should open your source …

Member Avatar for acperson
0
2K
Member Avatar for vishalsingwall

> This is urgent if any one could please help me resolve the stated issue....... [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] > I am Waiting.... I thought it was urgent? Stop sitting on your fingers waiting, and start being proactive in solving your own problems! [url]http://www.mysql.com/[/url]

Member Avatar for Salem
0
135
Member Avatar for Dewey1040

So what's the problem? Stopping when you see a "." ? Reading a line? Extracting words from a line? Or just printing them in reverse? Show us where you can get to yourself.

Member Avatar for Dewey1040
0
206
Member Avatar for acperson

> const char* article[]={"the", "a", "one", "some", "every", "any"} Is (for the compiler) const char* article[6]={"the", "a", "one", "some", "every", "any"} You cannot write a function which will tell you the answer 6. You can do this, which will give you 6 [ICODE]sizeof(article)/sizeof(article[0])[/ICODE] Which can be conveniently expressed as a …

Member Avatar for acperson
0
3K
Member Avatar for noktasizvirgul

[URL="http://www.google.com/search?q=programming+language+design&btnG=Google%20Search"]doing your own homework[/URL] vs. [URL="http://www.letmegooglethatforyou.com/?q=programming+language+design"]spoon-feeding[/URL]

Member Avatar for Salem
0
174
Member Avatar for pochacco
Member Avatar for Salem
0
126
Member Avatar for Se7Olutionyg

I dunno, 70 posts, and you've managed to figure out code tags. But it's still unindented crap which is hard to read. Translation - you're being ignored.

Member Avatar for Salem
0
99
Member Avatar for Freaky_Chris

> ReadConsoleInput(stin, inputStat, 1, &NumRead); How about ReadConsoleInput(stin, inputStat, numEvents, &NumRead); > delete inputStat; How about delete [ ] inputStat; You should also check the console API calls for success/failure as well.

Member Avatar for Freaky_Chris
0
201
Member Avatar for vskumar19

[url]http://www.letmegooglethatforyou.com/?q=Graphics+in+C+tutorial[/url]

Member Avatar for Salem
0
68
Member Avatar for elkoshli

> u didnt know what i mean? Oh we know exactly what you mean. It's standard homework which any of the competent helpers here would have no trouble doing in less time that it takes to reply to your thread. But that won't teach you anything like as much as …

Member Avatar for Salem
0
105
Member Avatar for serkan sendur

Well seeing as it took you 3 days to post some actual useful information about the problem, perhaps you could point us to an online manual for the compiler which you're having trouble reading. Better yet, show us that you've tried to understand the manual by pasting some actual commands …

Member Avatar for serkan sendur
0
131
Member Avatar for tori10

You've got this [ICODE] W_line sums; D = (( sums.w * sums.xx) -( pow(sums.x,2)));[/ICODE] Imagine this [ICODE] W_line sums = [COLOR="Red"]{ uninitialised, garbage, here }[/COLOR]; D = (( sums.w * sums.xx) -( pow(sums.x,2)));[/ICODE] What is the value of D given the rubbish you calculate with?

Member Avatar for Salem
0
124
Member Avatar for Undermine

> I have a program that's 95% written But 0% tested it would seem. > This should take an experienced programmer less then 30 minutes Sure, but how are you going to learn to clean up your own mess in future? Offer more money? That's gonna get expensive. Your approach …

Member Avatar for vmanes
0
99

The End.