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-)
Keep these in mind...
1) The argument in seekg is the absolute position in the file (in bytes). This includes white spaces and all.
2) The 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)...
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...
"But what type do i set my 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...
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-)
Hi Nosferatu
:-)Seems like we (had && have && will have) similar doubts ... Just skim through... I tried to answer ur questions at the bottom... hope this helps...
The declaration of a class (or struct, for that matter) like say, MyType below:
class MyType {
//...//
//...//
};
does not...
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-)
Right, but u can free it only if u use malloc() or calloc() or realloc() in the first place.
If u make it
char remember[5000];
u can't free it.
It will stay till its scope is lived (till the control is in the function it is declared in).
But using one of the allocation functions (like...
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.