Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: ankan
  • Order by date
  1. ankan

    Creating text with superscript

    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...
  2. ankan

    Question: about C pointer variable

    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-)
  3. ankan

    newbie and Bruce Eckels CD: "undefined reference to strcopy"

    How about changing "strcopy" to "strcpy".:-) Ankan. Please do correct me if I am wrong. s-)
  4. ankan

    Problem using "long double" data type

    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-)
  5. ankan

    Problem using "long double" data type

    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-)
  6. ankan

    using the seekg command for files

    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)...
  7. ankan

    Impossible pointer to function assignment?

    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...
  8. ankan

    Okay, i have returned my pointer to

    "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...
  9. ankan

    How to determine the Original Type of Pointer???????

    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-)
  10. ankan

    Missing File: BC.OBJ

    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-)
  11. ankan

    Strage problems with fread and int=13 or 26.

    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-)
  12. ankan

    Resizing an array in C++

    You may also try using vector. Ankan. Please do correct me if I am wrong. s-)
  13. ankan

    how to use int (*p)[3]

    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-)
  14. ankan

    #define

    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...
  15. ankan

    Read Text File

    Make that strncpy( ), not strtok( ). Sorry for the mistake. :-) Ankan. Please do correct me if I am wrong. s-)
  16. ankan

    Read Text File

    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-)
  17. ankan

    Object size

    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...
  18. ankan

    destructing a linked class!!

    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...
  19. ankan

    p=0 and p=NULL making me a boka

    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-)
  20. ankan

    How do I blank out a string?

    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...

Part and Inventory Search

Back
Top