On 08/24/2012 07:31 AM, (e-mail address removed) wrote:
....
I'm sorry Maybe I did not frame my query correctly. There are ascii strings stored in a memory and that memory address is stored in a pointer to a double. I need to store these ascii string values in my memory location.
Say A = "string1" , B = "string2" where A and B are memory addresses. These A,B are stored in a pointer to double i.e say if char **dp is the pointer to a double, then dp[0] contains A and dp[1] contains B . if char *ptr is a pointer pointing my memory location, I need to copy those ascii strings in ptr.
Hope I'm clear. thanks for the help.
Since the only things that you describe involving doubles are your
pointers to double, I strongly suspect that you should not be using such
pointers for this purpose. Wherever you currently have double* (a
pointer to double), try replacing it with char** (a pointer to a pointer
to char). Without a clearer statement of your problem, it's hard to give
more specific advice, but that at least should be a good starting point.
The best way to make it clear what you want is to provide a code sample.
Preferably a complete working program, as small as possible while
demonstrating what you're talking about. If your problem is that you
can't get it to work, a complete compilable program is second best. If
your problem is that you can't get it to compile, a complete program
that doesn't compiler and the associated error messages would be
helpful. If you can't even figure out how to start, you at least need to
provide a better description of what you're trying to do.
It's clear that you don't know how to correctly use words describing C
language constructs - it might be better to describe what you want to do
in terms of what a user of your program would see, rather than in terms
of how your program does it.