Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 773 Thanks ohnomis for the prefix version "++points" . ;)
I think you should mark the thread as solved. |
Forum: C++ Nov 1st, 2008 |
| Replies: 8 Views: 572 Which compiler are you using? Strange error :O |
Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 773 Do not initialize steps with command[++cmd], this will surely increment cmd before it even enters the switch statement. Just initialize the steps variable with any legal value. It will be better if... |
Forum: C++ Nov 1st, 2008 |
| Replies: 8 Views: 878 For prime function, have a look at this thread -
http://www.daniweb.com/forums/thread143933.html .
And for random function, have a look at this thread - ... |
Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 773 I think you can declare and intilialize steps after the function "processTurtleMoves" declaration.
void TurtleGraphics::processTurtleMoves( const int commands[] )
{
int steps=0;
.... .. .. ... |
Forum: C++ Oct 6th, 2008 |
| Replies: 8 Views: 1,395 Function call should be like this
func(array_name); //where array_name is the name of your array.
You should pass the array without any index, because passing with an index makes the value at... |
Forum: C++ Sep 6th, 2008 |
| Replies: 20 Views: 1,749 Thanks VernonDozier and Salem. :) |
Forum: C++ Sep 6th, 2008 |
| Replies: 20 Views: 1,749 cmath different in visual c++ and dev c++ ? Sorry, I know i ask a lot of questions but i'm Curious. |
Forum: C++ Sep 6th, 2008 |
| Replies: 20 Views: 1,749 Thanks Salem for your answers. :) But DEV-CPP compiled the code with no error, whereas with the same code Visual C++ gave the above error. |
Forum: C++ Sep 6th, 2008 |
| Replies: 20 Views: 1,749 When i compiled the above code in Visual C++, I got the following error error C2668: 'sqrt' : ambiguous call to overloaded function Though I understood the error, but the same code gave no errors... |
Forum: C++ Sep 5th, 2008 |
| Replies: 5 Views: 579 I think using system("pause"); is not recommended. |
Forum: C++ Sep 5th, 2008 |
| Replies: 20 Views: 1,749 Thanks VernonDozier for your concern. :) Actually after the Lerner's post, i realized what was Salem pointing at. "I dont got it" at the time when Salem gave me the hint, but after lerner's post it... |
Forum: C++ Sep 5th, 2008 |
| Replies: 20 Views: 1,749 Salem gave me the hint, but I dont got it. :( Thanks Lerner for helping. |
Forum: C++ Sep 5th, 2008 |
| Replies: 20 Views: 1,749 Any other tips for efficiency?
There is only 1 even prime number i.e 2. |
Forum: C++ Sep 4th, 2008 |
| Replies: 20 Views: 1,749 Thanks Salem for help, I think you really hate those who use "void main()" and you love "int main()" as your avtar and line under name says :D |
Forum: C++ Sep 4th, 2008 |
| Replies: 20 Views: 1,749 Why void main is deprecated in ISO standards? Where can i get a brief overview of the ISO C++ standards? |
Forum: C++ Sep 4th, 2008 |
| Replies: 20 Views: 1,749 I know about namespaces and the new standards i.e #include<iostream> , but ya my compiler "Turbo C++ v3.0" is old and dont understands the new formats like namespaces and the new style header files.... |
Forum: PHP Sep 4th, 2008 |
| Replies: 4 Views: 1,990 But, i think a doc file is different form a simple text file so this should not work. |
Forum: C++ Sep 4th, 2008 |
| Replies: 20 Views: 1,749 Q.Write a program which will print all the pairs of prime numbers whose sum equals the number entered by the user. ( suggested by Aniseed ) (Intermediate) ... |
Forum: C++ Aug 31st, 2008 |
| Replies: 8 Views: 678 I noticed that recheck , but i did something wrong in the second loop while correcting that. Therefore to avoid further error, i implemented it this way.
Thanks VernonDozier for optimized code. :) |
Forum: C++ Aug 31st, 2008 |
| Replies: 8 Views: 678 Does that mean i wrote a good code .. Hurray!! :twisted: |
Forum: C++ Aug 31st, 2008 |
| Replies: 8 Views: 678 Thanks William :) for your suggestions. I liked them. Can you tell me more about size_t (is it the longest unsigned integer?) And are there any suggestions for shorting the code, bcoz i think i coded... |
Forum: C++ Aug 31st, 2008 |
| Replies: 8 Views: 678 This is strstr() function made by me as given in the practice problem.
char *cstrstr(char s[],char ss[])
{
int l1,l2,i,j,k,flag=0;
char *p=NULL;
l1=strlen(s);
l2=strlen(ss);
... |