15,300 Posted Topics

Member Avatar for Iqbal_h_a
Member Avatar for emremr

Your emergency is not our problem. And we will not do your homework for you. As suggested in that assignment you can solve it with MathLib or some other ways. Why don't you discuss this with some of your classmates ????

Member Avatar for midimatt
0
231
Member Avatar for mrjoli021

I think you need to count the sentences and words independently -- that is use a different index for each. I didn't compile or test this, but something like this might work. [code] int sindex = 0; // sentence counter int windex = 0; // word index for(int i = …

Member Avatar for Ancient Dragon
0
97
Member Avatar for BBallAsh23

>>Anyone see where my garbage is? No -- I keep mine in garbage cans outside my house so that the trash truck can take it away each Tuesday morning :) Sorry if that was a bad joke. American Idol just started so I have to watch it. Be back in …

Member Avatar for BBallAsh23
0
155
Member Avatar for mrjoli021

that error message means that you are attempting to pass a std::string object to printf, but printf() required an integer -- "%d" is an integer, not a string. If all you want is the first character of a string then you need to access it like this: [icode] array[i][1][0][/icode], otherwise …

Member Avatar for Ancient Dragon
0
102
Member Avatar for mrjoli021

I guess you mean that you want to append a random number to a string array? [code] #include <sstream> #include <string> using namespace std; int main() { string s = "Hello World"; int rnd = rand(); stringstream stream(s); // append the random number to the string stream << rnd; // …

Member Avatar for Ancient Dragon
0
97
Member Avatar for Jennifer84

in OneFile.h you have to declare that variable with the [b]extern[/b] keyword [icode]extern int Number100;[/icode] Then in one of the *.cpp files [icode]int Number100 = 0;[/icode]

Member Avatar for Jennifer84
0
148
Member Avatar for kiwihaha

If you are using MS-DOS or MS-Windows you can draw lines draw [URL="http://www.asciitable.com/"]extended ascii codes[/URL] See the chart for other line-drawing characters. The other characters will not appear on your screen or show up as small circles/squares because most fonts don't use them for anything. Simple example: [code] int main() …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for renatoguga

[URL="http://www.alhem.net/Sockets/download.html"]Here is a library [/URL]and the site has a tutorial how to use it.

Member Avatar for vijayan121
0
119
Member Avatar for sneekula

[QUOTE=MidiMagic;508916]Mass transit doesn't work, unless a lot of people want to make the same trips. In a city like mine, there are so many different possible trips that mass transit to cover even a tenth of them is prohibitively expensive. [/QUOTE] St Louis began a mass transit rail system about …

Member Avatar for GrimJack
0
677
Member Avatar for nurulshidanoni
Re: pair

[QUOTE=nurulshidanoni;552303]What is the class of Display? error C2061: syntax error : identifier 'pair' error C2109: subscript requires array or pointer type error C2227: left of '->Display' must point to class/struct/union [code=C++] { int pair; const int student_size = 12; pair <int> * pair[student_size]; // Declare an array of pointers to …

Member Avatar for nurulshidanoni
0
264
Member Avatar for fiz hafiz

line 6: it would be more efficient if you passed the structure by reference (pointer) instead of by value. Note the asterisk below. You have to make similar change in the actual function. [icode]void proceed(struct registration* com, int matric);[/icode] line 32 and other similar lines -- you don't put the …

Member Avatar for WaltP
0
93
Member Avatar for EndureYoungMan

lines 1, 2 and 3. Current c++ standards do not allow for .h extension for system files. Unless you are using a very old compiler such as TurboC++ then it should be this: [code] #include <istream> #include <cstdlib> #include <fstream> using namespace std; // optional using std::cout; using std::fstream; using …

Member Avatar for EndureYoungMan
0
1K
Member Avatar for mrjoli021

Lets say you have 5 strings, you need to generate a randome number between 0 and (but not including) 5. Use the mod operator % to accomplish that [icode]int num = rand() % 5;[/icode]

Member Avatar for Ancient Dragon
0
138
Member Avatar for mrjoli021

why use two different character arrays when you can do it directly in the original, assuming the original is not string literals [code] char str[] "hello world"; str[0] = toupper(str[0]); [/code]

Member Avatar for Ancient Dragon
0
83
Member Avatar for monkey_boy_401

Do it the same way that I said you can change the mouse in your other thread. Seems like you are attempting to write a prank program ?????

Member Avatar for monkey_boy_401
0
79
Member Avatar for Ancient Dragon

I was unable to access DaniWeb for several hours this morning and for a few minutes again this afternoon -- began experience withdrawl symptoms :) Just me, our lousy wether today, or did you have computer problems?

Member Avatar for jbennet
0
46
Member Avatar for purepecha

The code you posted is C, not C++. [quote]/* Reset the original values after we print the result */// printf("%d raised to the %d power is %.0lf\n",parmA,parmB,*powerArgs(&parmA, &parmB));[/quote] Sorry, but your version of powerArgs() doesn't raise paramA to the power of paramB. Nor does it return anything so you can't …

Member Avatar for Ancient Dragon
0
133
Member Avatar for mrjoli021
Member Avatar for jbinbpt

Welcome to DaniWeb -- looking forward to seeing you around frequently.

Member Avatar for Serunson
0
48
Member Avatar for mudhole

Welcome to DaniWeb. I consider myself to be mechanically disadvantaged -- don't know a screwdriver from a shudge hammer :) It takes 100% of my mechanical ability to find the hole to fill up the gastank. But there are a lot of other very capable people here at DaniWeb who …

Member Avatar for Serunson
0
69
Member Avatar for zx81junky
Member Avatar for Serunson
0
94
Member Avatar for ShellyA
Member Avatar for Serunson
0
28
Member Avatar for Gadrel

Welcome to DaniWeb. And -- 1) So am I sometimes 2) Yup, me too 3) how can something be useless if its difficult ? 4) I was only wrong once in my life, when I thought I was wrong, but I was wrong. :) >>Season's Greetings Procrastinating ;) Hope to …

Member Avatar for Serunson
0
122
Member Avatar for Techboy1523

right, but you could have written your own little one-line program to prove that for yourself.

Member Avatar for Ancient Dragon
0
52
Member Avatar for Hockeyfreak889

VB will teach you a lot of things that are common to nearly all languages, such as data types (integers, strings etc), loops, and file systems. So pay close attention to what you are learning because they will be valuable later on. My recommendation is to begin learning c++. You …

Member Avatar for Hockeyfreak889
0
169
Member Avatar for jeffige

add getch() just before the return statement so that you can see the output. Otherwise your program works just great.

Member Avatar for Ancient Dragon
0
134
Member Avatar for nemesis4627

>>please correct this program... please!! i need it badly So, what is wrong with it? line 25 uses the wrong input function. fscanf("%s" ...) stops reading on the encounter of the first space. You should use fgets() instead to get the entire line [code] while( fgets( numIn, sizeof(numIn), spIn) ) …

Member Avatar for ithelp
0
209
Member Avatar for IAmPat

>>and some constructive criticism ok, here goes >> void main() never use it. [URL="http://www.gidnetwork.com/b-66.html"]Read this[/URL]: lines 13-19: that an onconventional way to initialize variables. It will work, but that form is rarly ever used. more commen is [icode]int iTurn = 1;[/icode] "\n" is usually preferred to endl because endl also …

Member Avatar for mitrmkar
0
159
Member Avatar for Michael_Knight

Ohhh you are an evil one :) :) Several (ok many) years ago during MS-DOS 6.X days I played a similar prank on my boss. I wrote a tiny C program that did nothing but display "Formatting drive c: Please Wait ...". I ran it on his computer after he …

Member Avatar for MidiMagic
1
142
Member Avatar for squid44th
Member Avatar for andyg55

>>Any ideas? You don't have to actually save each individual number in order to calculate the average. But if you want the values for something else then save them in an array or better yet in a file which doesn't take up much RAM. And my guess is that the …

Member Avatar for vijayan121
0
193
Member Avatar for Ancient Dragon

I've had this happen several times today -- push the submit button and an error message is produced. If I refersh the page my post was made correctly.

Member Avatar for MidiMagic
0
217
Member Avatar for Barbarrosa

why don't you post the code that actually gets the errors. What you posted is what you want to do but not necessarily what you actually did. I know what you are attempting on line 11 can be done because I've done that quite a few times too.

Member Avatar for Ancient Dragon
0
132
Member Avatar for nurulshidanoni

>>3 meet 36 is 1 how did you get that result? what is the mathametical formula ?

Member Avatar for nurulshidanoni
0
231
Member Avatar for sneekula

This morning I woke myself and my wife up laughing at some cartoon character. I don't recall the details but it must have been pretty funny.

Member Avatar for GrimJack
0
504
Member Avatar for zmnaiaj30

[URL="http://www.asciitable.com/"]ascii conversion table[/URL] [URL="http://www.ascii.cl/conversion.htm"]hex, decimal, octal, bin conversion table[/URL]

Member Avatar for Ancient Dragon
0
124
Member Avatar for hockeyplayer051

you could sort the numbers then its easy to find the middle one. Or add them all up, divide by 5 then check each of the numbers to find the one that is closest to that. 5.63 + 10.5 + 16.7 + 20.6+ 10.9 = 64.33 64.33 / 5 = …

Member Avatar for Ancient Dragon
0
97
Member Avatar for allmusic76

After getting the input string you could validate the string by first checking the string length to insure it is the correct length, then enter a loop and use isdigit() to check that each character is a digit or compare with ':' for a colon. If it passes all that …

Member Avatar for Ancient Dragon
0
104
Member Avatar for Sardor

I think you need to study c++ until you have learned it well before attempting to do complex things like sockets, server/client, networks.

Member Avatar for Ancient Dragon
0
103
Member Avatar for peaceful_soul

you need to read the description for fork() [quote] On success, the PID of the child process is returned in the parent's thread of execution, and a 0 is returned in the child's thread of execution. On failure, a -1 will be returned in the parent's context, no child process …

Member Avatar for peaceful_soul
0
114
Member Avatar for Dave Sinkula

I didn't like him either -- he was a real big stuffed shirt, more IQ then he knew what to do with. He came from privledged elete and was never hesitant to let everyone know it. RIP Buckley.

Member Avatar for bumsfeld
0
205
Member Avatar for sneekula

Right now I'm into diet Sunkist Orange soda, diet A&W Rootbeer, diet A&W Cream Soda, and diet Coke. Also love unsweetened ice tea.

Member Avatar for bumsfeld
0
266
Member Avatar for zandiago

Censorship is not always bad -- often serves some good purpose such as deleting government secrets (classified material), company secrets (such as how do they put the M on a piece of M&M candy?), criminal offenses of underage children, adoption papers, and the list goes on and on. We the …

Member Avatar for jwenting
0
133
Member Avatar for Infeligo
Member Avatar for fiz hafiz

line 53: you have to use printf() to do that. puts() only accepts one parameter and that is the string that is to be displayed. I don't know what other errors you want to know about. You'll have to be very specific.

Member Avatar for abhikkumarbasu
0
109
Member Avatar for rmsv_sen

Static methods can not call non-static methods. You will have to design some other solution to calling that method, such as making it static also.

Member Avatar for Ancient Dragon
0
260
Member Avatar for TMD

[code]matrix[i][j]= {" ------------ ---------------------- \n","| | |____ | | | |__ | ____ | |\n","| ____ |___| | | | __|_ | |____| _ |\n","| |____| | _|_ |__ | | | __|_ | |\n","|_|_ _____ | |_____ ___|\n","| ___ |_ | ________ | |\n","| | | ____ | | …

Member Avatar for TMD
0
113
Member Avatar for austinslik

Why do you want to convert that code to switch? It's not a good candidate for that. line 3: where is [b]dir[/b] declared ? line 5: The == operator is a boolean operator, not an assignment operator. So, as writtin, that line does nothing. If you intend to set [b]row[/b] …

Member Avatar for austinslik
0
135
Member Avatar for daviddoria

I think the problem is with [b]ostream[/b] -- you missed the namespace either std::ostream or add using namespace line.

Member Avatar for daviddoria
0
86

The End.