Ok, thanks.
Type: Posts; User: studiesrule
Ok, thanks.
I don't mean the printf feature (which I do know exists, but for backward compatibility). I was wondering why cout doesn't have a similar thing.
As I said before, I don't think this is very rational, but I'm just suggesting that if you really want to do it, you could try this. It's just an idea. And I happen to be a newbie programmer with...
Ok, I'm sorry to have confused you.
I said that you should restructure your program a bit. Instead of adding these numbers to another variable StrOut (as you are doing now), and then printing the...
worked like a charm. Thanks for your persistent help.
Oh, and another doubt, is there any call to output the type of the variable. Python has something like: type(variable), which outputs the type.
Here's the code I used:
#include <iostream>
using namespace std;
ape* aptr;
class ape
{
As far as I've understood your objective is too take two strings and a number 'n', and add up the first 'n' characters of str2 to str1. So just add another parameter to Add, so that 'j' simply adds...
Ok, I'm having another problem. The pointer that I'm going to reference to 'this' must be defined to be a 'class'. But that means that I'd have to put the class def infront of it. But the class...
Ok thanks. I wonder why they removed this small feature from C++
Thanks, That's all I wanted.
Ok here it's very simple, but suppose I'd like to print lets say 5-6 variables in a line, then I'd have to do cout <<var1<<" "<<var2<<" "... I find this tedious, and irritating. It's also hard to...
I didn't understand that. There's a variable lets say 'a', which is off this class. While 'a' is being constructed, i'd like to the ptr to reference the address of a.
Suppose in a class, I'd like to assign the address of the variable of that class type to a global variable, during construction. I don't know if this is possible, but it should, considering the...
Ok thanks a lot
Wow, I'm overwhelmed by the superfast reply (10 minutes). I needed something like int arr[20] = 0. I'm pretty sure I can do the same with ptrs, and initializing them to NULL. Thanks a lot.
Though...
I want to know how to modify the default addition property of a class. For example, if I were to create a class Complex, then the addition goes by adding the real components and the imaginary...
I'd like to know if it's possible to initialize arrays while defining it? The same with pointers. Is it possible to automatically allocate it, like calling ptr = new int ?
More than just saving...
I'm interested in the same thing. Can you post some links for both methods?
Umm, maybe this is a bit unconventional, but as this is just for this one function, you could go through a reasonable degree of pain and create your own set of functions to do it. Seeing your a...
As I suspected, the approximation isn't too taylor like:
for e^x:
/* How this works:
The input value, x, is written as
x = n * ln(2) + t/512 + delta[t] + x;
where:
- n is an...
Thanks a lot salem, I found what I was looking for there (assembly). That's what I was asking before, if it were in assembly. I guess I didn't really understand the reply. Now I've got to understand...
Ok I'm reviving this thread. I've gotten the glibc 2.4, and absolutely searched it head to toe. I looked into the math.h which refered all its prototypes the file mathcalls.h which contains macros of...
@ Dweia, I did feel the same, but I don't think that it would be very efficient. I've heard about an assembly code manner, but know no details (which is why I posted here).
Ok, I'm using the gcc complier, but I've checked up the MSVC++8 too. I thought that something kinda basic like the math header would have been standardised to all compilers by now. But the question...