2,384 Posted Topics

Member Avatar for zandiago

>[URL="http://en.wikipedia.org/wiki/Asperger_syndrome"]http://en.wikipedia.org/wiki/Asperger_syndrome[/URL] That makes more sense than [url]http://uncyclopedia.org/wiki/Asparagus_Syndrome[/url]

Member Avatar for iamthwee
0
218
Member Avatar for Dave Sinkula

I had so much fun with the 'Smoking' thread, let's do this again. Arguments for? Against? Have at 'er...

Member Avatar for scru
3
778
Member Avatar for Dave Sinkula

[url]http://www.dhmo.org/facts.html[/url] [quote][B]Should I be concerned about Dihydrogen Monoxide?[/B] Yes, you should be concerned about DHMO! Although the U.S. Government and the Centers for Disease Control (CDC) do not classify Dihydrogen Monoxide as a toxic or carcinogenic substance (as it does with better known chemicals such as hydrochloric acid and benzene), …

Member Avatar for MidiMagic
0
103
Member Avatar for Duki

[url]http://new-brunswick.net/workshop/c++/faq/assignment-operators.html[/url] [quote]Obviously no one ever explicitly does a self assignment like the above, but since more than one pointer or reference can point to the same object (aliasing), [COLOR="Red"]it is possible to have self assignment without knowing it[/COLOR]:[/quote]

Member Avatar for vijayan121
0
88
Member Avatar for appuguy
Member Avatar for lasher511

Count me against such. Just another flavor of [URL="http://en.wikipedia.org/wiki/Eugenics"]eugenics[/URL] IMO.

Member Avatar for Dave Sinkula
0
130
Member Avatar for dabu

Yes. (But it's really the if - fully brace everything and this becomes obvious.)

Member Avatar for vmanes
0
82
Member Avatar for arkane

Seems like your reading big-endian data into a little-endian value. You'll need to endian swap the bigs to littles.

Member Avatar for arkane
0
147
Member Avatar for The Dude

[QUOTE=Lardmeister;454681]As Carl Rove states: "Tell a lie often enough and it becomes the truth!"[/QUOTE]Attribution? Or are you just taking artistic license with an [URL="http://en.wikipedia.org/wiki/Big_lie"]old quote[/URL]?

Member Avatar for Lardmeister
0
177
Member Avatar for Salem

Is there any update for [URL="http://www.daniweb.com/forums/post429794-19.html"]this[/URL]?

Member Avatar for Dani
0
181
Member Avatar for thunderstorm98
Member Avatar for Ezzaral
1
872
Member Avatar for Ptolemy

[QUOTE=Ptolemy;456139]Despite what the regulars here say, switching from scanf to fgets/sscanf isn't going to solve all of your problems with scanf.[/QUOTE]Nope. But it easily passes the 80/20 rule for acolytes.

Member Avatar for Dave Sinkula
0
414
Member Avatar for csteverun

[QUOTE=csteverun;454895]I'm sure this is a really basic issue, but all the information I can find on C libraries usually looks like [INLINECODE]ar rc libutil.a util_file.o util_net.o util_math.o[/INLINECODE] and involves using ".o" object files (which never come with source code) and it never explains the missing links between the source code …

Member Avatar for csteverun
0
107
Member Avatar for The Dude
Member Avatar for Lardmeister
0
84
Member Avatar for Alexbeav
Member Avatar for The Dude

I think an interesting corollary to this question might be, "How much credit do you have (supposedly) at your disposal?" There are several piles of plastic I have no intention of ever using lying around, for example.

Member Avatar for Lardmeister
0
242
Member Avatar for rogenie
Member Avatar for Duoas
0
943
Member Avatar for teppuus
Member Avatar for teppuus
0
119
Member Avatar for Asif_NSU

[QUOTE=varunrathi]i was able to write the code for a factorial of upto 8000, but after that it`s not working b`cos the array i`m using to store the factorial can`t have more than 30000 elments. is there any other way to store more number of digits.[/QUOTE]It the array currently statically allocated? …

Member Avatar for roxanne_gem07
0
279
Member Avatar for Dave Sinkula

It's been a wonderfully fun flap in the news in this neck of the woods -- a simple [URL="http://clusty.com/search?query=phony%20soldiers%20rush"]search[/URL] may provide you some details if you haven't come across it. My question: can "elitist" "liberal" "intellectuals" even read?

Member Avatar for hopalongcassidy
0
196
Member Avatar for skyah

[code][COLOR="red"]#include [B]<[/B]stdio.h[B]>[/B] #include [B]<[/B]string.h[B]>[/B][/COLOR] #define N_STRINGS 7 #define arrayword 15 #define maxletters 15 int main(void) { int i, j, c; char line[N_STRINGS][arrayword]; char temp[maxletters]; printf("\nPlease type in %d words : ",N_STRINGS); for ( i = 0; i < N_STRINGS; ++i ) scanf("%s", line[i]); printf("\nHere is the list you entered:\n\n"); for …

Member Avatar for Narue
0
214
Member Avatar for Dave Sinkula

Don't cheat and look it up just yet, since this is material quite obviously not of my original creation. But please first comment anyone on the following material. [quote]I am going to talk of controversial things. I make no apology for this. It's time we asked ourselves if we still …

Member Avatar for Lardmeister
0
134
Member Avatar for kemboy
Member Avatar for ithelp
0
87
Member Avatar for jrice528

You may want to seed your random number generator too. [code]#include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { unsigned heads = 0; unsigned tails = 0; unsigned flips = 0; [COLOR="Red"]srand(time(0));[/COLOR] cout << "enter number of times to flip the coin." << endl; cin >> flips; …

Member Avatar for iamthwee
0
180
Member Avatar for The Dude

It's probably related to something like hanging a sign on your front lawn saying, [quote]Free Food! Crackheads welcome, no questions asked.[/quote] If you're comfortable with that, [I]then[/I] ask the guy down the street if he's kosher with it. Don't start with his yard.

Member Avatar for Lardmeister
0
130
Member Avatar for toko
Member Avatar for towhoe260

So you print your chosen character in all columns for the first row or last row, or in all rows for the first column or the last column; otherwise you print a space. And at the end of the line you print a newline. [code] for ( int r = …

Member Avatar for Dave Sinkula
0
145
Member Avatar for conan19870619

If you're dropping your homework here, what are your attempts at answers?

Member Avatar for conan19870619
0
136
Member Avatar for Narue

Who's Online seems to have a 10-minute lag of sorts. It seems to show my current location, but the time seems 10 minutes in the past. And I just ran the NIST time correction.

Member Avatar for Michele_Verona
0
250
Member Avatar for someguy88

In C and C++ string concatenation of adjacent string literals is automatic. [code] cout << "You enter the cave as a monster apears " "blah blah blah and it just goes on and " "doesn't look nice in the compiler." << endl;[/code]

Member Avatar for someguy88
0
99
Member Avatar for Dave Sinkula

If a member chooses to be invisible, should that member appear in the [URL="http://www.daniweb.com/chat/"]chat[/URL] list of active users? [edit]Delete if you so choose. I was slow on the draw. The simple workaround is to not identify yourself in your profile to match your chat nick.

Member Avatar for Aia
0
87
Member Avatar for gator6688

[code] if ( grade < Avg ) // this line getting both errors[/code]Let's see, grade is an array of ints and Avg is a double. A guess might be that you want to iterate through the array comparing each member to Avg, but C++ won't read your mind and create …

Member Avatar for Narue
0
158
Member Avatar for Dave Sinkula

I don't know the correct term to use in the title. It's been ages since I've messed with XML, and I don't use it in any professional way, nor am I headed that direction. (Before during and after this question, I will be searching [url]http://www.w3.org[/url] and other sites.) My question …

Member Avatar for Dave Sinkula
0
168
Member Avatar for makmak02

[QUOTE=zandiago;444364]What's the purpose of the '^' (carot) symbol in C\C++?[/QUOTE][URL="http://en.wikipedia.org/wiki/Bitwise_operation#XOR"]Bitwise exclusive or[/URL].

Member Avatar for Ancient Dragon
0
144
Member Avatar for psyman_86

[QUOTE=psyman_86;444722][Error(ccom):lcd.h,line 44] [COLOR="Red"]parse error at near[/COLOR] 'LCDSetCursorPosn'[/QUOTE]I love that compiler's diagnostic messages! Some day we oughtta compare HEW war stories. [code][COLOR="Red"]bool[/COLOR] LCDSetCursorPosn(unsigned char column, unsigned char row);[/code]Where does bool come from?

Member Avatar for psyman_86
0
265
Member Avatar for horntastic
Member Avatar for veronicak5678

[For others playing along, see also [URL="http://cboard.cprogramming.com/showthread.php?t=94052"]here[/URL] and [URL="http://forums.devshed.com/c-programming-42/expected-primary-errors-478130.html"]here[/URL].]

Member Avatar for Dave Sinkula
0
126
Member Avatar for phasita
Member Avatar for thyagarajan

[QUOTE=Ancient Dragon;443022]use the time_t (normally an unsigned int)[/QUOTE]Really? I've always been annoyed by it being a signed long.

Member Avatar for Ancient Dragon
0
351
Member Avatar for sakthi_2001

Perhaps unroll the loop? [code] int number = 56789, sum = 0; sum += number % 10; number /= 10; sum += number % 10; number /= 10; sum += number % 10; number /= 10; sum += number % 10; number /= 10; sum += number % 10; number …

Member Avatar for twomers
0
717
Member Avatar for jimwalther
Member Avatar for Dave Sinkula
0
94
Member Avatar for megan-smith

Dave's short version: read all user input as the text it is; interpret it at your leisure.

Member Avatar for Salem
0
126
Member Avatar for Dave Sinkula

[url]http://www.americancivicliteracy.org/[/url] [quote][B]MAJOR FINDINGS[/B] [list][*]College Seniors Failed a Basic Test on America's History and Institutions. [*]Colleges Stall Student Learning about America. [*]America's Most Prestigious Universities Performed the Worst. [*]Inadequate College Curriculum Contributes to Failure. [*]Greater Learning about America Goes Hand-in-Hand with More Active Citizenship.[/list][/quote] [B][URL="http://www.americancivicliteracy.org/resources/quiz.aspx"]Take the Quiz[/URL][/B] My results: [quote]You answered …

Member Avatar for twomers
0
135
Member Avatar for gator6688

[QUOTE=gator6688;442643]Somebody please put me out of my misery and write this for me. Please.[/QUOTE]I nominate this for lameass post of the month. Do you mind if I borrow it for my collection?

Member Avatar for Dave Sinkula
0
288
Member Avatar for zandiago

Eliminate the "magic" in which you don't tell the program what to do but you want it to work right anyway. Things such as [list][*]Calculating the length of a sentence [I]before[/I] you've read the sentence. [*]Evaluating the value of ch [I]before[/I] you've given it a value.[/list]Most folks would write the …

Member Avatar for zandiago
0
201
Member Avatar for Duki

Guess: [code] char init[100] = {1,2,3,4}; CharPair cp(5, init);[/code]You can't do this: [code]CharPair::CharPair ( int sz , char test [ [COLOR="Red"]sz[/COLOR] ] )[/code]

Member Avatar for Dave Sinkula
0
91
Member Avatar for BigFormat

[QUOTE=Aia;441358]Are you refering to [B]Extended Binary Coded Decimal Interchange Code[/B] ([B]EBCDIC[/B])?[/QUOTE]Pretty much. But portability is portability. I remember thinking it was really cool to do stuff like [INLINECODE]x - 32[/INLINECODE] instead of [INLINECODE]toupper[/INLINECODE], or somesuch. Until I found out it was both more cryptic [I]and[/I] slower.

Member Avatar for Salem
0
435
Member Avatar for srikanth329
Member Avatar for alsoumhi
0
283
Member Avatar for Bennymin

[code]#include <fstream> #include <iostream> #include <string> #include <sstream> using namespace std; int main() { ifstream file("Test2.txt"); if ( file ) { const int ROW = 5, COL = 7; string array[ROW][COL]; for ( int i = 0; i < ROW; i++ ) { string line; [COLOR="Green"]if [/COLOR]( getline(file, line) ) …

Member Avatar for Bennymin
0
137
Member Avatar for Duki

[QUOTE=Duki;440362]Could somone give me a hint as to why my division by 0 check doesn't work?[/QUOTE]You're not checking for division by 0 -- you're checking for division by '0'. [QUOTE=Duki;440364]At line 36 I added the word const [/QUOTE]Why would you make if const if you're going to modify it?

Member Avatar for Duki
0
147

The End.