Forum: C++ 1 Day Ago |
| Replies: 4 Views: 116 you will need to set up the variable values for numerator and the denominator using 2 different for loops
and then compute numerator/denominator.. after which you send it up. |
Forum: C++ 1 Day Ago |
| Replies: 2 Views: 124 Thank You Narue!!
I didn't realise that :) |
Forum: C++ 1 Day Ago |
| Replies: 2 Views: 124 Hey Everyone,
I have written this Matrix Multiplication program. But The Program seems to crash when during the filling of the first matrix, exactly after the completion of the first row.
Here... |
Forum: C++ 31 Days Ago |
| Replies: 7 Views: 341 well your could use cout.width() function..... with an argument. to set up the allignment |
Forum: C++ 32 Days Ago |
| Replies: 9 Views: 348 apart from what A.D said, to get a little technical, you may want to try the peek() function. Check if that character is an alphabet or a number. if its a number . take in the number with the >>... |
Forum: C++ 32 Days Ago |
| Replies: 6 Views: 278 Well firstly you will need a database or a particular condition to determine the age of the person with the ID card number.
If this is a project for you ..... read through the material to get the... |
Forum: C++ 32 Days Ago |
| Replies: 7 Views: 341 The Prime testing method is absolutely mis-interpreted.
http://www.daniweb.com/forums/thread233963.html
Here is a recent prime number test code. Try to change it such that it matches your... |
Forum: C++ 32 Days Ago |
| Replies: 11 Views: 469 Or another thing you can do is to call the grade function from Average (). |
Forum: C++ 34 Days Ago |
| Replies: 8 Views: 256 Post down your current code. This forum has a rule that we cannot give homework help until you show your effort. :) |
Forum: C++ 34 Days Ago |
| Replies: 8 Views: 520 This is perfectly right !! Nice, work figuring out the suggestion of FirstPerson . |
Forum: C++ Oct 27th, 2009 |
| Replies: 6 Views: 251 Yes, its a mere notational advantage .
This applies to both for loops and if statements.
If the curly braces { } are absent. the loop only executes the next line.
for(j=2; j<=i/2; j++)
... |
Forum: C++ Oct 27th, 2009 |
| Replies: 6 Views: 251 Well this program is not as complex as it seems to be.
for(i=1; i<=100; i++)
The first for loop runs from 0 to 100, and runs a test for checking whether its prime or not.
Then in the... |
Forum: C++ Oct 27th, 2009 |
| Replies: 7 Views: 234 Well, what dkalita means is that.... no value is assigned to the variables. givenFirst and givenLast.
Apart from that there are many other mistakes in your program.
Firstly, the declaration... |
Forum: C++ Oct 27th, 2009 |
| Replies: 5 Views: 265 I wonder if it is compulsary to use new to allocate variable space. Since it is only one. Why dont you just declare a variable. That way you will not need to worry about deleting. as the Destructor... |
Forum: C++ Oct 26th, 2009 |
| Replies: 9 Views: 226 well you could use the logical && to join up checking for all !! and use one if statement only! |
Forum: C++ Oct 26th, 2009 |
| Replies: 9 Views: 226 Do you know how to use arrays? If you are comfortable with arrays, try using them to replace the different mark variables.
Btw, this program doesn't check if the other variables apart from f, have... |
Forum: C++ Oct 25th, 2009 |
| Replies: 4 Views: 116 Well is it that you want the value of the variable to be changed at run-time or during compilation. |
Forum: C++ Oct 25th, 2009 |
| Replies: 4 Views: 511 http://www.daniweb.com/forums/announcement8-2.html
The answer to all your so called queries!! |
Forum: C++ Oct 25th, 2009 |
| Replies: 1 Views: 125 Add the 10 totals value to derieve a FULL SALES value, That Sales divided by 10 would give you the Average. What you can do is store the totals in the array, then compute the Average. And then... |
Forum: C++ Oct 24th, 2009 |
| Replies: 6 Views: 316 cout<<strupr(s[0]);
This Does Not Work . Because strupr() takes a char* as an argument. So the argument should be a sting having a null character ie: '\0' at the end. But you give a character as... |
Forum: C++ Oct 24th, 2009 |
| Replies: 4 Views: 230 I really wonder if that's possible..
What you are trying to do is to make an executable without actually compiling the C++ syntax.
Without the compiler, I think that the C++ syntax would be juz... |
Forum: C++ Oct 21st, 2009 |
| Replies: 6 Views: 194 I agree that this makes it more efficient . My only approach was to exhibit what the OP was trying to do, with a for loop!! |
Forum: C++ Oct 21st, 2009 |
| Replies: 8 Views: 312 Please post your existing code and the updates that you have done. So it will be easier to come up with an answer. And also tell us which forloop to avoid. |
Forum: C++ Oct 21st, 2009 |
| Replies: 3 Views: 314 Remove the declaration of the variable int i=0; from line 14 and place it in between 33-34 or 34-35.
The problem is that the scope of the variable which retains the value of 11 after the first... |
Forum: C++ Oct 21st, 2009 |
| Replies: 2 Views: 178 Ok, I would currently say that your solution is INCOMPLETE, But it doesn't suck!! :)
Though I will not completely give you the solution, here are a few tips on getting to the right path.
... |
Forum: C++ Oct 21st, 2009 |
| Replies: 6 Views: 194 Firstly, I would like to point out to you that your code is actually assigning values but not comparing them.
[while(g[0] = 0 || g[0] = 1 || g[0] = 2 || g[0] = 3 || g[0] = 4 || g[0] = 5 || g[0] = 6... |
Forum: C++ Oct 20th, 2009 |
| Replies: 4 Views: 221 Well the thing is that, You get to know if a certain number is prime .. After you have checked it with all the numbers. But here .. You are checking it with each number and then printing them up. So... |
Forum: C++ Oct 11th, 2009 |
| Replies: 2 Views: 275 Have fun implementing it !! (http://www.daniweb.com/forums/announcement8-2.html)
WE DONT GIVE HOMEWORK HELP IF YOU DONT PUT IN EFFORT.
Write some code and then get back to the site to clear... |
Forum: C++ Oct 6th, 2009 |
| Replies: 21 Views: 684 Well its pretty unclear for me to understand this, Please Post down the Input , Desired Output and Current Output. That way it would be easy. |
Forum: C++ Oct 6th, 2009 |
| Replies: 4 Views: 318 Well, Instead of criticizing our so called criticizm. Why dont you use a for loop to take in input .. And While you are at it. try to use cout and cin as printf and scanf are Considered as 'C'... |
Forum: C++ Oct 5th, 2009 |
| Replies: 5 Views: 226 Well, we appreciate that you are trying to put-in effort. But We would require you to make an attempt at cracking the solution yourself. Then when you have an attempt, we could then come in and get... |
Forum: C++ Oct 5th, 2009 |
| Replies: 21 Views: 684 Shoudnt Line 12 be
the reverse newNode->info=i->info;
And could you explain what line 15 is doing? |
Forum: C++ Oct 5th, 2009 |
| Replies: 4 Views: 318 I would say that this is supposed to be a C question and even that it is poorly written. Whats your question ? |
Forum: C++ Oct 5th, 2009 |
| Replies: 5 Views: 226 Firstly you are looking at different operations.
1) Maintain A Database, That's pretty much done, when you have a excel spreadsheet which you can later convert into CSV (Comma separated Value )... |
Forum: C++ Oct 5th, 2009 |
| Replies: 21 Views: 684 If both are of type string, you could just use the "=" operator and completely avoid strcpy. |
Forum: C++ Oct 5th, 2009 |
| Replies: 3 Views: 98 http://www.eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx
This link would also help you understand the pottential of Pointers. |
Forum: C++ Oct 5th, 2009 |
| Replies: 6 Views: 275 Post down the total code so its easier to troubleshoot. |
Forum: C++ Oct 5th, 2009 |
| Replies: 21 Views: 684 I dont understand why cant you use.
tempword=i->info; |
Forum: C++ Oct 5th, 2009 |
| Replies: 21 Views: 684 for(int i = first; i->link != NULL; i = i->link)
Check Line 4 in the code in your post. it consists the above code.You have declared variable i to be of type int then you use the -> operator .... |
Forum: C++ Oct 5th, 2009 |
| Replies: 6 Views: 275 A google search before posting always helps.
Anyways check this code out.
http://forums.devx.com/showthread.php?t=154478 |