Search Results

Showing results 1 to 40 of 382
Search took 0.03 seconds.
Search: Posts Made By: Rashakil Fol ; Forum: C++ and child forums
Forum: C++ 18 Days Ago
Replies: 3
Views: 224
Posted By Rashakil Fol
Objects in C++ can't change their type. You can have a variable of some pointer-to-animal type and then assign a new pointer-to-animal to that variable though.
Forum: C++ Nov 9th, 2009
Replies: 1
Views: 200
Posted By Rashakil Fol
Just remove a letter from the first string, print that letter, and do a recursive call. Of course, you'll want to do this for each letter.
Forum: C++ Nov 5th, 2009
Replies: 7
Views: 659
Posted By Rashakil Fol
Your problem is that you're writing very complicated and redundant code and thus it's hard to think about what your code is doing. Use a simpler algorithm to find and remove the largest and smallest...
Forum: C++ Oct 23rd, 2009
Replies: 6
Views: 276
Posted By Rashakil Fol
It doesn't matter. Do what you enjoy. It's not like it's hard to learn a new language later. Realize that you'll have to mostly teach yourself C++ if you really want to learn it, because your...
Forum: C++ Oct 23rd, 2009
Replies: 1
sql
Views: 129
Posted By Rashakil Fol
http://lmgtfy.com/?q=sql
Forum: C++ Oct 22nd, 2009
Replies: 4
Views: 224
Posted By Rashakil Fol
No, next_permutation won't work because his desired output is out of order :)

Hope this helps :)

#include <stdio.h>
int main(void) {
puts("123");
puts("132");
puts("213");
...
Forum: C++ Oct 21st, 2009
Replies: 8
Views: 601
Posted By Rashakil Fol
The U means that it's an unsigned integer literal. size_t is an unsigned integer type that's guaranteed to be able to hold the size of an array. But not a std::string. If you're paranoid you...
Forum: C++ Oct 21st, 2009
Replies: 8
Views: 601
Posted By Rashakil Fol
Is your call to .length() getting called every time or are you assuming that will get optimized away?
Forum: C++ Oct 21st, 2009
Replies: 4
Views: 651
Posted By Rashakil Fol
Don't use any globals (i.e. static variables) and have your function that calculates the answer be separate from the function that prints the answer.
Forum: C++ Oct 11th, 2009
Replies: 3
Views: 410
Posted By Rashakil Fol
Uh, I meant double tsurface = tsurfaceFUNCTION(radius, height, PI); of course.
Forum: C++ Oct 11th, 2009
Replies: 3
Views: 410
Posted By Rashakil Fol
Your syntax is invalid. You're using the syntax for declaring a function, when you should be using the syntax for calling a function:

double tsurface = tsurfaceFUNCTION(radius, height, double...
Forum: C++ Oct 8th, 2009
Replies: 9
Views: 801
Posted By Rashakil Fol
Huh? I didn't insert any tags.
Forum: C++ Oct 8th, 2009
Replies: 9
Views: 801
Posted By Rashakil Fol
I was asking a yes or no question, and a simple "no" would have sufficed :P
Forum: C++ Oct 8th, 2009
Replies: 9
Views: 801
Posted By Rashakil Fol
What? Are you mentally retarded?
Forum: C++ Oct 8th, 2009
Replies: 9
Views: 801
Posted By Rashakil Fol
Just use vector<>. Never use arrays. I mean, sure, at some point in time, you'll want to learn how to use them. They are useful for implementing vectors, after all. And sometimes, occasionally,...
Forum: C++ Oct 8th, 2009
Replies: 4
Views: 262
Posted By Rashakil Fol
atoi(text[0]) will not work because atoi expects a char*, not a char. That half of NeoKyrgyz's answer was basically useless and dumb.

If you want to convert the character "c" representing the...
Forum: C++ Sep 26th, 2009
Replies: 13
Views: 455
Posted By Rashakil Fol
Try figuring it out yourself. Then maybe you'll learn something.
Forum: C++ Sep 25th, 2009
Replies: 13
Views: 455
Posted By Rashakil Fol
Why don't you keep track of how many values the user has entered, and use some mechanism to see if that number's 10?
Forum: C++ Mar 14th, 2009
Replies: 22
Views: 1,530
Posted By Rashakil Fol
What? Why did you suddenly start using C?
Forum: C++ Mar 13th, 2009
Replies: 22
Views: 1,530
Posted By Rashakil Fol
Do you understand how arrays work?
Forum: C++ Mar 13th, 2009
Replies: 22
Views: 1,530
Posted By Rashakil Fol
If I were you, I would regard each of your details, 1, 2, and 4, as an individual problem to write a function for. Then the program is a simple combination of these functions, meeting detail 3.
Forum: C++ Mar 13th, 2009
Replies: 22
Views: 1,530
Posted By Rashakil Fol
You could start with a function that gets the input from the user.
Forum: C++ Mar 13th, 2009
Replies: 10
Views: 676
Posted By Rashakil Fol
You want to calculate the n-term series and not the infinite series?
Forum: C++ Mar 13th, 2009
Replies: 22
Views: 1,530
Posted By Rashakil Fol
What help do you need?
Forum: C++ Mar 13th, 2009
Replies: 14
Views: 785
Posted By Rashakil Fol
Your "line equation" is wrong -- you have defined a point.
Forum: C++ Mar 12th, 2009
Replies: 10
Views: 676
Posted By Rashakil Fol
In that case, the right solution would still be to use the closed form expression :)
Forum: C++ Mar 12th, 2009
Replies: 10
Views: 676
Posted By Rashakil Fol
Well it's almost like the series for exp(x), except the signs are alternating and it's missing the x^1 term and the x^0 term has the wrong sign. If consider the series you get for exp(-x), you...
Forum: C++ Mar 12th, 2009
Replies: 17
Views: 665
Posted By Rashakil Fol
I assumed you would have no problem spotting the errors, but alas, some are still unnoticed.
Forum: C++ Mar 11th, 2009
Replies: 2
Views: 398
Posted By Rashakil Fol
You need some way to convert strings to ints. One way is to use a stringstream, another way, after verifying that all characters of the string are digits and that there is one or more of them, is to...
Forum: C++ Mar 11th, 2009
Replies: 17
Views: 665
Posted By Rashakil Fol
You have errors.
Forum: C++ Mar 10th, 2009
Replies: 5
Views: 662
Posted By Rashakil Fol
It is so polymorphism. The derived class can override the base class's behavior in other ways than just virtual functions.
Forum: C++ Mar 10th, 2009
Replies: 5
Views: 662
Posted By Rashakil Fol
What are you asking? Are you confused about the operational semantics of C++, or are you asking about terminology?
Forum: C++ Mar 10th, 2009
Replies: 1
Views: 398
Posted By Rashakil Fol
You want a struct with a double and a bool.

You should never use inheritance except as a mechanism for polymorphism -- one reason being that 'putting stuff into structs' or classes (a.k.a....
Forum: C++ Mar 9th, 2009
Replies: 10
Views: 605
Posted By Rashakil Fol
I typed up a long reply to you before but decided to save it. One thing I think that is horrible with your notation is your use of functions like isnz, ife, etc etc. Ultimately they're insufficient...
Forum: C++ Mar 7th, 2009
Replies: 6
Views: 300
Posted By Rashakil Fol
Oh, it's just looking for a main function to run.

http://codepad.org/teq2fuVp

It seems to work fine. You have an implementation of Vector, right?
Forum: C++ Mar 7th, 2009
Replies: 6
Views: 300
Posted By Rashakil Fol
No, the answer is not that you're designing anything wrong. There is nothing wrong at all about mutually recursive data datatype definitions. There are inconveniences involved with circular data...
Forum: C++ Mar 7th, 2009
Replies: 10
Views: 605
Posted By Rashakil Fol
Figure it out yourself.
Forum: C++ Mar 7th, 2009
Replies: 10
Views: 605
Posted By Rashakil Fol
Just by reading the code and looking at what it does.
Forum: C++ Mar 6th, 2009
Replies: 5
Views: 445
Posted By Rashakil Fol
Don't ask us, ask your teacher.
Forum: C++ Mar 6th, 2009
Replies: 10
Views: 605
Posted By Rashakil Fol
It is possible to convert C++ code to mathematical expressions. And it's basically straightforward. I think your scheme for this is fairly straightforward, except that you seem to write the +...
Showing results 1 to 40 of 382

 


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

©2003 - 2009 DaniWeb® LLC