a. One option is to use the Rich Text Format codes for storing the string. Displaying the strings, if required, would be easy as you can use the RichTextBox control. Morever, this is a good option as RTF codes are pretty standard, and your data can be easily ported between applications if...
There are no 2 addresses. Its the same memory location where the array is stored (to be precise, the 1st element of the array is stored)... name and &name point to the same memeory location, and hence the same value. Ankan.
Please do correct me if I am wrong. s-)
Change the line...
d=(double)(123456789012345+d1);
to...
d=(double)(123456789012345.+d1);
or even...
d = 123456789012345. + d1;
Does that work??
Ankan.
Please do correct me if I am wrong. s-)
Change the line...
d=(double)(123456789012345+d1);
to...
d=(double)(123456789012345.+d1);
or even...
d = 123456789012345. + d1;
Does that work??
Ankan.
Please do correct me if I am wrong. s-)
...bytes in a file are numbered starting with 0.
So to get to the 'n'th object in a file in which the field width of each object is 'w'...
fin.seekg( w*(n-1), ios::beg)
...is what needs to be done. This is for reading. For writing you need to use seekp. Ankan.
Please do correct me if I am...
I think...
rcv_mail[0] = ser_rcv_mail;
...should work fine. But you can't use the contents of the rec_value variable since its just a character array, and the compiler isn't going to look at it in any other sense.
By the way, "(How) can I let a "pointer to a function" variable...
...function to, so it knows i am returning a function pointer?"
Here is a function that returns a pointer to function returning void...
void (*func())() {
//...
// ur code here
//...
}
Kindly go through faq205-924 (and give me a nice vote :-D). Ankan.
Please do correct me if I am...
Hi maltobji...
Apart from what Matt and Ion said above, I would like to add this...
In response to your "what i'm trying to do is like what sizeof() function do...."
sizeof is actually an operator not a function. :-) Ankan.
Please do correct me if I am wrong. s-)
Hi
I also downloaded the same compiler... and its working fine :-)...
... and, I did not find 'BC.OBJ' anywhere in my HDD... (!!??)
But the OS is Win98SE (not WinME)... Ankan.
Please do correct me if I am wrong. s-)
I think the problem's because u did not open the file in binary mode while reading from it...(try "rb" instead of "r")... Ankan.
Please do correct me if I am wrong. s-)
int *p[10]
declares p as an array[10] of pointers to int. A simple example of use is...
[COLOR=blue]
int *p[10];
int num;
p[3] = # /* makes the address of num the 4th element of p */
[color]
Similarly...:-) Ankan.
Please do correct me if I am wrong. s-)
It just means
replace 'ToRad(X)' with 'X*(PI/180)' wherever you find it in the file except when it is within quotes (" ") or when it is within a comment (/**/ or //).
Its directed to the preprocessor, and occurs before the compilation actually begins. Ankan.
Please do correct me if...
If its not fixed length, you may ...
1) Search for the newlines...
or,
2) Read the file line by line (using getline) till u get to the line u require, and then use strtok( )...
Hope this helps.:-) Ankan.
Please do correct me if I am wrong. s-)
...this is when the space for the objects is allocated(and at a different place away from wherever the methods are stored). The total space would be 3*(sizeof(MyType)) as there are three objects (x, y, z) each occupying a space of sizeof(MyType). Incidentally (and obviously) sizeof(MyType) gives...
Thanks a lot!! Nosferatu.
The concept of Containers was new to me, and your replies above were very helpful. They really helped (and hence the stars :-) ).
BTW, the destructor that I gave above need not have the line
delete last_it;
and if it has it, it should be
if(last_it) delete...
And C gurantees that 0000:0000 is never a valid address.
So, in essence u are pointing it to nothing.:-) Ankan.
Please do correct me if I am wrong. s-)
...declared in).
But using one of the allocation functions (like SwapSawe), right from the start would be better.
And Matt did not
remember = 0;
what he did was
*remember = 0;
equivalent to
remember[0] = 0;
equivalent to
remember[0] = '\0'; :-) Ankan.
Please do correct me if I am...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.