Search Results

Showing results 1 to 40 of 672
Search took 0.04 seconds.
Search: Posts Made By: Sky Diploma
Forum: C++ 20 Days Ago
Replies: 7
Views: 305
Posted By Sky Diploma
well your could use cout.width() function..... with an argument. to set up the allignment
Forum: C++ 21 Days Ago
Replies: 9
Views: 305
Posted By Sky Diploma
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++ 21 Days Ago
Replies: 6
Views: 233
Posted By Sky Diploma
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++ 21 Days Ago
Replies: 7
Views: 305
Posted By Sky Diploma
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++ 21 Days Ago
Replies: 11
Views: 377
Posted By Sky Diploma
Or another thing you can do is to call the grade function from Average ().
Forum: C++ 23 Days Ago
Replies: 8
Views: 236
Posted By Sky Diploma
Post down your current code. This forum has a rule that we cannot give homework help until you show your effort. :)
Forum: C++ 23 Days Ago
Replies: 8
Views: 473
Posted By Sky Diploma
This is perfectly right !! Nice, work figuring out the suggestion of FirstPerson .
Forum: C++ 25 Days Ago
Replies: 6
Views: 233
Posted By Sky Diploma
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++ 25 Days Ago
Replies: 6
Views: 233
Posted By Sky Diploma
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++ 25 Days Ago
Replies: 7
Views: 224
Posted By Sky Diploma
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++ 25 Days Ago
Replies: 5
Views: 244
Posted By Sky Diploma
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++ 26 Days Ago
Replies: 9
Views: 214
Posted By Sky Diploma
well you could use the logical && to join up checking for all !! and use one if statement only!
Forum: C++ 26 Days Ago
Replies: 9
Views: 214
Posted By Sky Diploma
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++ 27 Days Ago
Replies: 4
Views: 110
Posted By Sky Diploma
Well is it that you want the value of the variable to be changed at run-time or during compilation.
Forum: C++ 27 Days Ago
Replies: 4
Views: 447
Posted By Sky Diploma
http://www.daniweb.com/forums/announcement8-2.html

The answer to all your so called queries!!
Forum: C++ 27 Days Ago
Replies: 1
Views: 120
Posted By Sky Diploma
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++ 28 Days Ago
Replies: 6
Views: 285
Posted By Sky Diploma
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++ 28 Days Ago
Replies: 4
Views: 219
Posted By Sky Diploma
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++ 31 Days Ago
Replies: 6
Views: 181
Posted By Sky Diploma
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++ 31 Days Ago
Replies: 8
Views: 308
Posted By Sky Diploma
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++ 31 Days Ago
Replies: 3
Views: 301
Posted By Sky Diploma
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++ 31 Days Ago
Replies: 2
Views: 174
Posted By Sky Diploma
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++ 31 Days Ago
Replies: 6
Views: 181
Posted By Sky Diploma
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++ 32 Days Ago
Replies: 4
Views: 214
Posted By Sky Diploma
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: 265
Posted By Sky Diploma
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: 655
Posted By Sky Diploma
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: 302
Posted By Sky Diploma
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: 207
Posted By Sky Diploma
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: 655
Posted By Sky Diploma
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: 302
Posted By Sky Diploma
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: 207
Posted By Sky Diploma
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: 655
Posted By Sky Diploma
If both are of type string, you could just use the "=" operator and completely avoid strcpy.
Forum: C++ Oct 5th, 2009
Replies: 3
Views: 94
Posted By Sky Diploma
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: 268
Posted By Sky Diploma
Post down the total code so its easier to troubleshoot.
Forum: C++ Oct 5th, 2009
Replies: 21
Views: 655
Posted By Sky Diploma
I dont understand why cant you use.


tempword=i->info;
Forum: C++ Oct 5th, 2009
Replies: 21
Views: 655
Posted By Sky Diploma
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: 268
Posted By Sky Diploma
A google search before posting always helps.

Anyways check this code out.
http://forums.devx.com/showthread.php?t=154478
Forum: C++ Oct 5th, 2009
Replies: 4
Views: 288
Posted By Sky Diploma
Well in your question. You said that you need to use arrays. But You are not using any in your program. The best approach would be to analyse the question and think how you can use a index to get the...
Forum: C++ Oct 2nd, 2009
Replies: 4
Views: 264
Posted By Sky Diploma
Yes, Btw, Dont forget deleting each one of the dynamic pointers . Before you delete the pointer to pointer.
And yea, Loops could assign values.
Another solution would be to use vectors.
Forum: C++ Oct 2nd, 2009
Replies: 4
Views: 264
Posted By Sky Diploma
Well Dynamic 2D arrays take a little more complexity.This is mainly because when you declare something like this


int *p;
p= new int [2][2];

What you are trying to do is assigning a pointer...
Showing results 1 to 40 of 672

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC