2,384 Posted Topics
Re: >[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] ![]() | |
I had so much fun with the 'Smoking' thread, let's do this again. Arguments for? Against? Have at 'er... | |
[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), … | |
Re: [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] | |
Re: Count me against such. Just another flavor of [URL="http://en.wikipedia.org/wiki/Eugenics"]eugenics[/URL] IMO. | |
Re: Yes. (But it's really the if - fully brace everything and this becomes obvious.) | |
Re: Seems like your reading big-endian data into a little-endian value. You'll need to endian swap the bigs to littles. | |
Re: [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]? | |
Re: Is there any update for [URL="http://www.daniweb.com/forums/post429794-19.html"]this[/URL]? | |
![]() | |
Re: [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. | |
Re: [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 … | |
Re: [img]http://www.strikerimports.com/catalogit/fl060017.jpg[/img] | |
Re: [url]http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher#Description[/url] | |
Re: 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. | |
Re: So check the number currently being input against the current extrimum. | |
Re: [code]inFile.open(RES_FILENAME[COLOR="Red"].c_str()[/COLOR]);[/code] | |
Re: [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? … | |
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? | |
Re: [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 … | |
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 … | |
Re: [code]if ( target =[COLOR="Red"]=[/COLOR] array[i] )[/code] | |
Re: 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; … ![]() | |
Re: 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. | |
Re: [url]http://www.daniweb.com/forums/thread90228.html[/url] | |
Re: 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 = … | |
Re: If you're dropping your homework here, what are your attempts at answers? | |
Re: 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. | |
Re: 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] | |
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. | |
Re: [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 … | |
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 … | |
Re: [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]. | |
Re: [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? | |
Re: If you're on a modern OS, abandon ancient tools. | |
Re: [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].] | |
Re: Some input methods ignore all whitespace. | |
Re: [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. | |
Re: 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 … | |
Re: Quick look -- perhaps: [code]while (nextDigit == 1 || nextDigit ==0)[/code] | |
Re: Dave's short version: read all user input as the text it is; interpret it at your leisure. | |
[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 … | |
Re: [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? | |
Re: 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 … | |
Re: 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] | |
Re: [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. | |
Re: [URL="http://www.daniweb.com/code/snippet141.html"]Another snippet[/URL]. | |
Re: [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) ) … | |
Re: [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? |
The End.