2,384 Posted Topics

Member Avatar for nurulshidanoni

Learn to indent in a better way and the answer should be obvious. In the meantime, here's a quick pass through the beautifier. [code=C++]/*--------------------------- Filename : ConflictMatrix.cpp ---------------------------*/ #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <vector> using namespace std; struct student { string studentid; vector <int> examcode; }; …

Member Avatar for nurulshidanoni
0
123
Member Avatar for gallantmon1

A comment on that: default char may be unsigned. If EOF is negative, do you suppose a nonnegative value will ever be equal?

Member Avatar for Aia
0
119
Member Avatar for Lardmeister

From my inbox: [QUOTE="Wesley Pruden"]‘You might find an ethic in the Legislature,’ a former [Louisiana] governor once said, ‘and you might find a virgin in a bordello. But it’s a heckuva place to look for either one.'[/QUOTE]

Member Avatar for Lardmeister
0
729
Member Avatar for RexxX

[QUOTE=RexxX;536776]The reason I have the -48 there is to convert the char to an integer, that someone else here told me to do. I figured out that I needed to make the char buff a pointer by adding an asterisk and all my warnings went away but I'm still getting …

Member Avatar for Aia
0
112
Member Avatar for jimJohnson

[url]http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code[/url]

Member Avatar for WaltP
0
288
Member Avatar for c++noobie

Don't put the initialization in the class description: [CODE] int var1[COLOR="Red"] = 0[/COLOR], var2[COLOR="Red"] = 0[/COLOR], choice;[/CODE]Just declare the members: [CODE] int var1, var2, choice;[/CODE] Use the constructor for initialization.

Member Avatar for Dave Sinkula
0
2K
Member Avatar for fskhan

[QUOTE=WaltP;530873]If you think about it, you'd find this is more straight forward:[/QUOTE]If you look at Narue's, though, it's got a nice little optimization yours lacks.

Member Avatar for jephthah
0
3K
Member Avatar for The Dude

Dude, have you ever considered blogging? It's well suited to posting links to other stuff. Threads like [URL="http://www.daniweb.com/forums/post524495.html#post524495"]this[/URL] come to mind.

Member Avatar for Narue
-1
253
Member Avatar for tb808kid

[url]http://cboard.cprogramming.com/showthread.php?t=33318[/url] Some of the more recent posts may be more pertinent. I'd better post this too: [url]http://www.daniweb.com/forums/thread63827.html[/url]

Member Avatar for tb808kid
0
162
Member Avatar for Ancient Dragon
Member Avatar for maravich12
0
234
Member Avatar for Dave Sinkula

The anti-[URL="http://www.daniweb.com/forums/thread47822.html"]thread[/URL]. Let's see if I can have the shortest thread in this forum. I'll start. The person replying to this thread... Produces more heat than light.

Member Avatar for maui_mallard
0
101
Member Avatar for certem

[QUOTE=certem;306168]In the net i have seen something like BCD that is related for official accounting issues but i coudn't make any use of it because i didn't understand it.[/QUOTE]Do you mean where floating point is completely eschewed because of inherent difficulties, and instead integer math is used? Such that instead …

Member Avatar for John A
0
245
Member Avatar for werks

[URL="http://clusty.com/"]Clusty[/URL].:icon_wink: [QUOTE=stuff911;521113]I have some privacy issues with google,but so be it. They all collect [B]TOO [/B]much info,so what do you want from me?![/QUOTE]Perhaps [URL="http://www.scroogle.org/"]scroogle[/URL] is of interest then.

Member Avatar for joshSCH
0
231
Member Avatar for mysterio

Can you post your initial attempt? Language (C or C++)? You may want to investigate the functions isupper, islower, toupper and tolower.

Member Avatar for gkbush
1
585
Member Avatar for Dave Sinkula

[url]http://en.wikipedia.org/wiki/First_Amendment_to_the_United_States_Constitution[/url] [quote]Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.[/quote]How do you choose to …

Member Avatar for sneekula
0
553
Member Avatar for devious

[QUOTE=Narue;513260]>I think a good forum index should have it all in your face on one page. You're welcome to your opinion, and I'm sure Dani will take it into consideration. But keep in mind how big and overwhelming the forum index would be with that many forums visible at once. …

Member Avatar for Michael_Knight
0
163
Member Avatar for The Dude
Member Avatar for twomers

[url=http://sounds.stoutman.com/sounds4c3/badger.wav]"Badgers? Badgers? We don't need no stinking badgers!"[/url]

Member Avatar for vmanes
0
276
Member Avatar for uniquestar
Member Avatar for scru
0
153
Member Avatar for Ravenous Wolf

Some samples: [url=http://www.simondelivers.com/nav_home.asp?Page=Groceries]Groceries[/url] [url=http://www.bestbuy.com/]Electronics[/url] [url=http://www.sears.com]Various[/url]

Member Avatar for sneekula
0
243
Member Avatar for Ezzaral

[QUOTE=MidiMagic;509153]Bicycle riders who won't obey the traffic laws (a bicycle is a vehicle, not a pedestrian).[/QUOTE]You'd love [url=http://en.wikipedia.org/wiki/Critical_Mass]Critical Mass[/url].

Member Avatar for Estella
0
214
Member Avatar for Narue

One of my favorite discoveries in C++ regards displaying such a list. Initially one might do this.[code]#include <iostream> #include <vector> using namespace std; int main() { int a[] = {1,2,3,4,5}; vector<int> v(a, a + 5); [COLOR=Blue]for (int i = 0; i < 5; ++i) { cout << v[i] << endl; …

Member Avatar for bector
2
8K
Member Avatar for silentdragoon

[QUOTE=Aia;507462]If all that you want to do is to remove the new line you could always look at the character before the nul terminator. [CODE]if ( words[i][ [COLOR="Red"]strlen[/COLOR]( words[i] ) - 1] == '\n' ) { words[i][ [COLOR="Red"]strlen[/COLOR]( words[i] ) - 1] = '\0'; } [/CODE][/QUOTE]Keeping the possibility of looooooong …

Member Avatar for Dave Sinkula
0
113
Member Avatar for The Dude

[QUOTE=MidiMagic;501610]The greatest threat to world peace is governments.[/QUOTE]I've got a solution: let's give 'em a couple billion to make themselves better.

Member Avatar for sneekula
0
469
Member Avatar for Lardmeister

Today, what is the cheapest and most available/affordable form of energy?

Member Avatar for sneekula
0
302
Member Avatar for scru

[QUOTE=Infarction;497028]Not that the Muslims are the only one's who've ever done that...[/QUOTE]Any recent (past hundred years or so) incidents you've got in mind?

Member Avatar for ZZucker
0
227
Member Avatar for jacques95
Member Avatar for Karkaroff

[url=http://www.eecs.harvard.edu/~ellard/CS50-95/programming-style.html] Brian Kernighan's Programming Style Tips[/url]

Member Avatar for Karkaroff
0
248
Member Avatar for TheBeast32

Voila: [code="C++"]POINT MousePoint; int X = 0; int Y = 0; int MaxTime = 0; int Counter = 0; int NumOfResults = 0; int Xmax, Ymax = 0; int InputNumStr = 0; char Action = 'a'; int TempInt, InputInt = 0; char FileName[256] = "AAAAAAAAAAAAAAAAAAA"; char TempStr[256] = "AAAAAAAAAAAAAAAAAAA"; BOOL …

Member Avatar for iamthwee
0
190
Member Avatar for Lardmeister

[QUOTE=jwenting;461024]Uh, that point was reached in the 1800s when scientists were adamant that everything was known and all that needed to be done was write it all up.[/QUOTE]No, no. It's time to [URL="http://ask.yahoo.com/20050407.html"]close the patent office[/URL]. ;)

Member Avatar for jbennet
0
564
Member Avatar for harpreet1582
Member Avatar for mayank_ati
Member Avatar for sneekula
0
150
Member Avatar for ellas747

[QUOTE=prathys]i have made some modifications in ur code.Now try this code.If this also dont work,send me the error messages you get.ok.have a nice time[/QUOTE][code] Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland test.c: Error E2176 test.c 5: Too many types in declaration Error E2188 test.c 13: Expression syntax …

Member Avatar for invisal
-1
118
Member Avatar for kararu

[QUOTE=kararu;252007]Can anyone suggest me commands which will take a given thing and execute it in the command line and return the output. system() doesnt suit me bcos 1.it returns int not entire output 2.it opens command line window(shell) ( I dont want to open the window or display the output …

Member Avatar for hkdani
1
120
Member Avatar for The Dude

Easy research into this query. [url]http://clusty.com/search?query=bible%20%22capital%20punishment%22[/url]

Member Avatar for sneekula
2
419
Member Avatar for The Dude
Member Avatar for sneekula
0
79
Member Avatar for vegaseat
Member Avatar for sgssergio
0
1K
Member Avatar for lasher511

If the causes and effects are still debatable, is it worth a substantial portion of a country's productivity and people's standards of living to be sacrificed for a "cure"?

Member Avatar for hopalongcassidy
1
831
Member Avatar for mae ann

Ah, that time in the semester again. [B]NO.[/B] Search like the rest of us and cheat the hard way.

Member Avatar for jbennet
0
295
Member Avatar for Lardmeister

WRT the title, a related item: [url]http://www.townhall.com/columnists/SuzanneFields/2007/10/08/getting_the_last_laugh[/url]

Member Avatar for Lardmeister
0
531
Member Avatar for joshSCH

Can someone explain the appeal of football(soccer)? For me it's like watching watching ants -- they go this way and that and never really seem to be doing anything.

Member Avatar for bumsfeld
0
213
Member Avatar for twomers

[url]http://en.wikipedia.org/wiki/List_of_states_with_nuclear_weapons[/url] [url]http://www.nucleartourist.com/[/url] (more on topic)

Member Avatar for bumsfeld
0
737
Member Avatar for Lardmeister

[url]http://en.wikipedia.org/wiki/Miss_Teen_USA_2007#Final_Competition[/url] [QUOTE]She said that she was "in shock" during the competition and barely heard the question that had been asked.[/QUOTE] [url]http://www.townhall.com/news/entertainment/2007/08/28/pageant_contestant_re-answers_question?page=full&comments=true[/url] [QUOTE]Upton was taking her flubbed answer _ and the attention _ in stride. "Everything did come at me at once. I was overwhelmed and I made a mistake. Everybody …

Member Avatar for bumsfeld
0
89
Member Avatar for >shadow<

[QUOTE=jbennet;460173]What year was it when you were 14 though?[/QUOTE]Hm. 14. [URL="http://en.wikipedia.org/wiki/1984"]1984[/URL]. [URL="http://en.wikipedia.org/wiki/1984_in_science#Computer_science"]Uh[/URL]... I probably had [URL="http://en.wikipedia.org/wiki/Texas_Instruments_TI-99/4A"]this[/URL]. :p 3.0 MHz, 256 bytes RAM :D

Member Avatar for hollystyles
0
378
Member Avatar for MattEvans
Member Avatar for longrun
0
548
Member Avatar for weasel7711
Member Avatar for kehar
Member Avatar for sandeep.thakur1
0
164
Member Avatar for Dave Sinkula
Member Avatar for Dave Sinkula
Member Avatar for bumsfeld
0
115
Member Avatar for Dave Sinkula

Care to share any that you are wearing? This is from a couple years ago.

Member Avatar for twomers
0
128

The End.