1,358 Posted Topics

Member Avatar for 013..

Kudos for admitting it's homework. Look through your book better. If it's any good at all, the tutorials and examples you need are all right there in front of you. They may not be the answer to the problem, but you should be able to adapt them to it.

Member Avatar for 013..
0
93
Member Avatar for wilsonz91

1.) Please use [b][noparse][code-syntax]...code tags...[/code][/noparse][/b]. They make your code easier to read. 2.) You are making a common rookie mistake. You're using assignment statements instead of equality statements. Take another look at the operators used in your comparisons.

Member Avatar for wilsonz91
0
120
Member Avatar for raknashivar

You'll have to study the ECMA-262 standard as well as several HTML specifications and a few other standards. Let us know how it goes.

Member Avatar for Fbody
-2
45
Member Avatar for naveenbutola
Re: test

[QUOTE=nav33n;1113570]What are you testing btw ?[/QUOTE] And why is his name so creepily similar to yours? I might suggest watching this user, it's their first post. Another forum I'm a member of had a user do the same thing. It turned out to be a spambot.

Member Avatar for vaultdweller123
0
93
Member Avatar for faaz

[QUOTE=faaz;1111194]well if it is in the loop like this: then if i input say 5 it would say the sum of the number is 5 and it would say enter a number, if i enter 5 it would give me 10. however that is not what the problem is asking …

Member Avatar for dusktreader
0
2K
Member Avatar for Rec3000

almostbob's idea is probably better. But, if you have to use JavaScript, you will have to close the PHP block before you include it then re-open it after the JS. Otherwise, your JS will get eaten by the PHP parser and cause issues.

Member Avatar for Rec3000
0
142
Member Avatar for wolfkrug

[code=c++]while ((repeat = y) || (repeat = Y));[/code] You are attempting to assign the variables 'y' and 'Y' to the variable 'repeat' rather than comparing to the characters. There are two issues: 1.) You need to use the equality operator not the assignment operator. 2.) To make the compiler consider …

Member Avatar for Fbody
0
131
Member Avatar for cane23

um...... Use the less-than relational operator '<'. It doesn't take a geek to figure that one out... :P

Member Avatar for vaultdweller123
0
73
Member Avatar for RobBobSmith

I suspect this is beyond my abilities at the moment. But perhaps we can clarify for someone else... Your example looks like a series generator. Are you trying to accept seed values (I think d, T, k, and 'alpha') which are then used as the starting point for generation of …

Member Avatar for Fbody
0
166
Member Avatar for Fbody

Since [URL="http://www.daniweb.com/forums/thread251025.html"]this thread[/URL] was solved/closed about 2-weeks ago, I have not received any subscription messages at all. During that time, I should have received about 15. Did the mail server somehow swing from one extreme to the other? Did the server's IP or mail address change since then? Do I …

Member Avatar for Fbody
0
130
Member Avatar for XiaO yuEn

Having trouble making sense of your code. Please re-post using code tags. /*this is what you'll get */ /* and you're more likely to get help... */

Member Avatar for rohitn
-1
108
Member Avatar for iammfa

The errors don't appear to be related to your use of "setw()". The numbers in parentheses after the file path and name are line numbers. Double-click on one of them to go to the line where the error is indicated. Always fix the first error listed first, it may be …

Member Avatar for WaltP
0
228
Member Avatar for invinate

Your objects are set to [icode]const[/icode]. You can't hope to accomplish anything if they are constants. Start by making the objects themselves non-const then go from there. You can use [icode]const[/icode] for arguments/parameters/methods without having the original variables/objects set as [icode]const[/icode] themselves.

Member Avatar for invinate
0
212
Member Avatar for sexyzebra19

A vector probably would not be the best choice unless you create 2 parallel vectors and manage them accordingly. A multi-dimensional array could work, but you would have to be careful about your capacity. You would have to use a high-precision dataType like a [icode]double[/icode]. I don't know the precision …

Member Avatar for sexyzebra19
0
150
Member Avatar for yUhki

[QUOTE=yUhki;1112373]In a gymnastics or diving competition each contestant`s scores is calculated by dropping the lowest scores received and then adding the remaining scores.Create a program that allows the user to enter 8 judge`s scores and outputs the points received by the contestant.Format the output with two decimal places. ( A …

Member Avatar for Fbody
-3
142
Member Avatar for bman214

For a how-to, try this: [url]http://www.cplusplus.com/doc/tutorial/functions/[/url] For some reference material, try this:[url]http://www.daniweb.com/forums/thread235535.html[/url] (There are a few other links in some of the responses.)

Member Avatar for bman214
0
143
Member Avatar for Learning78

I can't help you with MFC, but this: [icode]if(s == correct)[/icode] is most likely not correct unless you have defined 'correct' as some sort of macro or a variable. If you are trying to compare to a string literal, you need double-quotes (" ") around the literal:[icode]if(s == [b]"[/b]correct[b]"[/b])[/icode]. Without …

Member Avatar for mitrmkar
0
159
Member Avatar for ashishchoure

Almost all modern consumer-grade processors are x64 architecture with an x86 subset. Whether you are processing x64 or x86 instructions depends on if the operating system is written for 64 or 32 bits respectively.

Member Avatar for ashishchoure
0
234
Member Avatar for Violet_82

You should be able to open any standard *.cpp and *.h files without any special steps. What exactly is the issue you are having? Are you trying to open the sources in VC++ and can't? Or are you trying to compile them after writing them for a different compiler and …

Member Avatar for Violet_82
0
186
Member Avatar for DavidDD

The compiler is probably complaining that you are either trying to resize an existing array or are going outside its boundaries. If you only need a single dimension, try using vectors instead they're a little more flexible. You can dynamically resize a vector using [icode]vectorName.resize(wordLength)[/icode]. You really can't do that …

Member Avatar for DavidDD
0
127
Member Avatar for Fbody

I just started an advanced C++ course and my instructor sent around a file with this piece of code: [code]class smallobj // specify a class { public: smallobj() : iData(0){} // Constructor smallobj(int iInValue) : iData(iInValue) {} // Overloaded Constructor ~smallobj() {} // Destructor void setdata(int d) // member function …

Member Avatar for Fbody
0
1K
Member Avatar for clutchkiller

I think there is a way to do it by manipulating the output stream's formatting, but I'm not totally familiar with that yet. In the meantime, you could just multiply by 100 when you output it. [code=c++] float percent = 0.0f; float value1 = 12.0f; float value2 = 48.0f; percent …

Member Avatar for Fbody
0
79
Member Avatar for xka

[QUOTE=niek_e;1101185]Never use goto. It's bad coding practice. Instead, you can put the entire switch in a while(something) loop. [B]When you want out, just make "something" true[/B]. For example: [code] bool looping = true; while (looping) { switch (foo) { case 1: std::cout << "1!, stop looping!"; looping = false; break; …

Member Avatar for jonsca
0
186
Member Avatar for cableguy31

There are a couple ways to do it. 1. AJAX 2. Self-validating page/form AJAX is a procedure (not a language) that uses JavaScript, XML, and PHP to dynamically change the contents of a web page without completely reloading it. You would use JavaScript to get information from your form and …

Member Avatar for vaultdweller123
0
111
Member Avatar for nats01282

[QUOTE=nats01282;1097035]Hello all. im new to mySQL database so dont know very much so sorry if its a daft question. I have a mySQL database with a company called 5quidhosting but my hosting is with heart internet. Can i get a web page hosted with heart to access the database on …

Member Avatar for nats01282
0
369
Member Avatar for CppBuilder2006

Has it occurred to you that you have a fairly unique situation that we may not have an easy or immediate answer for? In my experience, the people here are VERY helpful when they can be.

Member Avatar for CppBuilder2006
-2
583
Member Avatar for Nick Evan

Thanks for the info and for posting niek_e. I thought I'd provide an update... Since un-subscribing, and sending the PM, I've received 2 more notifications (about 15-mins apart). So obviously the un-subscribe didn't fully take.

Member Avatar for Fbody
0
323
Member Avatar for Stevoni

I'm really new to C++ as well, so I don't know how to establish the actual link to a library yet. What I do know is that what you are looking for is a header file designed for your library. In C++, "header" files (*.h files) contain various function declarations, …

Member Avatar for Ancient Dragon
1
233
Member Avatar for fadia

[QUOTE=fadia;1095011]Still facing the same problem. The output is not returning anything ! I just enter the number then I get press any key to continue... No matter what the base case is. :S Anyway I've altered the base case as you advised.. and still... :( [CODE]int decrement (int n) { …

Member Avatar for fadia
0
132
Member Avatar for Roguefoxx

I'm afraid your question is a little confusing... Are you referring to the page with the "Welcome Back...", "Recently Updated...", and "New Threads..." headings? If so, all you have to do is click on the DaniWeb logo in the top left. Or do you mean going (for example) from within …

Member Avatar for ~s.o.s~
1
179
Member Avatar for Androggles

"Call to undefined function..." means that a function's name as written does not exist. C++ is case sensitive. Have you double-checked your capitalization? Look up the sleep function in your help file for the Windows library.

Member Avatar for Excizted
1
483
Member Avatar for لولوة

Are you referring to 'set'ter and 'get'ter functions within an object/class?

Member Avatar for Dave Sinkula
0
213
Member Avatar for dchunt

[QUOTE=dchunt;1090806]Say i have this 10,000,000 (10 million) byte file. I want to perform multiplication,addition and few other operation on all those bytes(total of 5). And after it is done say if i want to repeat the addition and other operations on the same file like a loop,then How many such …

Member Avatar for jonsca
0
834
Member Avatar for Excizted

I don't know much about bit manipulation yet, but I know that in this context the tokens/operators [icode]<<[/icode] and [icode]|[/icode] are "bitwise operators". [icode]operator<<[/icode] is the "left shift" operator. If x and y are 16-bit integers and x==0000000000000001 (which is 16-bit binary for the decimal value 1) and y==0000000000000000 (decimal …

Member Avatar for Excizted
0
149
Member Avatar for new programer

You can't use an actual case statement from a switch as a conditional. The cases are linked to the switch structure. You will need to use some other value or a flag of some sort. [code=c++] bool validInput; do{ validInput = true; //assume input is valid until invalid input detected …

Member Avatar for new programer
0
82
Member Avatar for Snapster5

1. Why do the prototypes [code=c++]float Square_root(int); void Base_exp(int, int);[/code] even exist? You don't call them anywhere... 2. The default signature/prototype for pow() is [icode]double pow([B]double[/B], int)[/icode]. You either need to change the type of Num1 to double or cast it to double when you use it. 3. Sort out …

Member Avatar for Ancient Dragon
0
148
Member Avatar for alnea

[QUOTE=Clinton Portis;1072988]I wish you luck on your endeavors.[/QUOTE] nice :)

Member Avatar for Fbody
-4
87
Member Avatar for PDB1982

A couple days ago I worked on a similar problem in another language. If it is within the current scope of your class and/or personal knowledge set, the solution for my problem was to create a multi-dimensional (2-dimensional, specifically) array rather than an array for each individual quiz/exam. The first …

Member Avatar for jonsca
0
118
Member Avatar for ssheck1034

I know the thread is marked "solved", but you have the only post in it... What specifically is the error? Are you calling resetAll() from any location other than the constructor?

Member Avatar for Narue
1
66
Member Avatar for norbert90

[QUOTE=norbert90;1062671]Using "Nested For" Loop, Write a program that prints the letter M. Thank you All![/QUOTE] We can't do your homework for you, but we can help. You need to show some effort first. Try it and post the resultant code. If it doesn't work, fine, we'll help you make it …

Member Avatar for Clinton Portis
-5
93
Member Avatar for Nikhar

[icode]istream[/icode] is the input stream base class that nearly all inputs are derived from. The class can be linked to files, hardware ports (such as USB or COM), etc... The object [icode]cin[/icode] is a special globally-scoped object/instance of the [icode]istream[/icode] class that is automatically linked to the console/keyboard. Without seeing …

Member Avatar for Nikhar
0
2K
Member Avatar for epicasian

I know you're waffling between C# and C++, but I thought I'd throw this out for you. I started on FreeBASIC, you can find it at [url]www.freebasic.net[/url]. It works on DOS, Win, and *nix systems. I'm still very new to C++ myself, but I've managed to learn concepts in FB …

Member Avatar for Frederick2
0
252
Member Avatar for kiranpreddy05

Your first error is on line 555. On line 553, you redefine the identifier ChildRect to mean nothing, was that your intent? I probably can't help beyond that, GUI building makes me dizzy.

Member Avatar for Fbody
0
239
Member Avatar for sfurlow

[QUOTE=sfurlow;1038231] <...snip...> How do I go about doing this? I created a text file with the example information in it, but how do I import this into the project?[/QUOTE] Use an input file stream ([icode]ifstream myFile(MASTER_FILE_NAME);[/icode]) to read the information into your program and process it accordingly.

Member Avatar for Fbody
0
102
Member Avatar for Gem74

You use [icode]ofstream[/icode] to create an OUTPUT file stream. You use this if you want to write to a file. To read from a file into your program, you need an INPUT file stream, so you want to use [icode]ifstream[/icode]. Change [icode]ofstream myfile;[/icode] to [icode]ifstream myfile;[/icode] Also, you are attempting …

Member Avatar for Fbody
0
245
Member Avatar for rookanga

Try initializing [icode]found[/icode] to false instead of true. Also, since SIZE is a global constant, you shouldn't need to pass it to your function. It's automatically available, you can just use it.

Member Avatar for Fbody
0
130
Member Avatar for Ponomous

[QUOTE=Ponomous;1036724]Hi, So i have written my code to solve the quadratic equation and it works. The thing I need to do is to read values for 3 variables from an input .txt file until the end of the file and output the answers for each set of variables. The variables …

Member Avatar for Fbody
0
209
Member Avatar for djnstuff

If you want the Atk, Def, monAtk, and monDef variables to randomize for each iteration of the loop, you will have to calculate them inside the loop. Currently, you calculate them before the loop starts and you have no way to get back to them to re-calculate them.

Member Avatar for Shinedevil
0
322
Member Avatar for restrictment

[QUOTE=restrictment;1034837]Hello, I am trying to make an rpg, and I am having troubles with functions. I am currently working on the 'potion' aspect of my rpg, which I have highlighted in red. My question is this: Is it possible to make the function return money, potion number, potion size, etc? …

Member Avatar for restrictment
0
374
Member Avatar for RonW56

What I can see looks correct. What is the error you're getting? Also, please use code tags, it makes it easier to read.

Member Avatar for boblied
0
119

The End.